• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# MulticastDelegate类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MulticastDelegate的典型用法代码示例。如果您正苦于以下问题:C# MulticastDelegate类的具体用法?C# MulticastDelegate怎么用?C# MulticastDelegate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MulticastDelegate类属于命名空间,在下文中一共展示了MulticastDelegate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: DeleteFromInvocationList

        private MulticastDelegate[] DeleteFromInvocationList(MulticastDelegate[] invocationList, int invocationCount, int deleteIndex, int deleteCount)
        {
            MulticastDelegate[] thisInvocationList = _invocationList;
            int allocCount = thisInvocationList.Length;
            while (allocCount / 2 >= invocationCount - deleteCount)
                allocCount /= 2;

            MulticastDelegate[] newInvocationList = new MulticastDelegate[allocCount];

            for (int i = 0; i < deleteIndex; i++)
                newInvocationList[i] = invocationList[i];

            for (int i = deleteIndex + deleteCount; i < invocationCount; i++)
                newInvocationList[i - deleteCount] = invocationList[i];

            return newInvocationList;
        }
开发者ID:afrog33k,项目名称:csnative,代码行数:17,代码来源:MulticastDelegate.cs


示例2: mg_set_uri_callback

	[DllImport("_mongoose",CallingConvention=CallingConvention.Cdecl)] private static extern void	mg_set_uri_callback(IntPtr ctx, string uri_regex, MulticastDelegate func, IntPtr data);
开发者ID:GotenXiao,项目名称:blink1,代码行数:1,代码来源:mongoose.cs


示例3: TrySetSlot

        private bool TrySetSlot(MulticastDelegate[] a, int index, MulticastDelegate o)
        {
            if (a[index] == null && System.Threading.Interlocked.CompareExchange(ref a[index], o, null) == null)
                return true;

            if (a[index] != null)
            {
                MulticastDelegate d = o;
                MulticastDelegate dd = a[index];
                if (dd._methodPtr == d._methodPtr &&
                    dd._target == d._target)
                {
                    return true;
                }
            }

            return false;
        }
开发者ID:afrog33k,项目名称:csnative,代码行数:18,代码来源:MulticastDelegate.cs


示例4: CombineImpl

        protected override Delegate CombineImpl(Delegate follow)
        {
            if (follow == null)
                return this;

            // Verify that the types are the same...
            if (this.GetType() != follow.GetType())
                throw new ArgumentException("DlgtTypeMis");

            MulticastDelegate dFollow = (MulticastDelegate)follow;
            MulticastDelegate[] resultList;
            int followCount = 1;
            MulticastDelegate[] followList = dFollow._invocationList;
            if (followList != null)
                followCount = (int)dFollow._invocationCount;

            int resultCount;
            MulticastDelegate[] invocationList = _invocationList;
            if (invocationList == null)
            {
                resultCount = 1 + followCount;
                resultList = new MulticastDelegate[resultCount];
                resultList[0] = this;
                if (followList == null)
                {
                    resultList[1] = dFollow;
                }
                else
                {
                    for (int i = 0; i < followCount; i++)
                        resultList[1 + i] = followList[i];
                }
                return NewMulticastDelegate(resultList, resultCount);
            }
            else
            {
                int invocationCount = _invocationCount;
                resultCount = invocationCount + followCount;
                resultList = null;
                if (resultCount <= invocationList.Length)
                {
                    resultList = invocationList;
                    if (followList == null)
                    {
                        if (!TrySetSlot(resultList, invocationCount, dFollow))
                            resultList = null;
                    }
                    else
                    {
                        for (int i = 0; i < followCount; i++)
                        {
                            if (!TrySetSlot(resultList, invocationCount + i, followList[i]))
                            {
                                resultList = null;
                                break;
                            }
                        }
                    }
                }

                if (resultList == null)
                {
                    int allocCount = invocationList.Length;
                    while (allocCount < resultCount)
                        allocCount *= 2;

                    resultList = new MulticastDelegate[allocCount];

                    for (int i = 0; i < invocationCount; i++)
                        resultList[i] = invocationList[i];

                    if (followList == null)
                    {
                        resultList[invocationCount] = dFollow;
                    }
                    else
                    {
                        for (int i = 0; i < followCount; i++)
                            resultList[invocationCount + i] = followList[i];
                    }
                }
                return NewMulticastDelegate(resultList, resultCount);
            }
        }
开发者ID:afrog33k,项目名称:csnative,代码行数:84,代码来源:MulticastDelegate.cs


示例5: op_Inequality

	public static bool op_Inequality(MulticastDelegate d1, MulticastDelegate d2) {}
开发者ID:Pengfei-Gao,项目名称:source-Insight-3-for-centos7,代码行数:1,代码来源:MulticastDelegate.cs


示例6: GPTC_EventCallBack

 public static extern short GPTC_EventCallBack(ushort CardNumber, ushort Enabled, ushort EventType, MulticastDelegate callbackAddr);
开发者ID:Raxtion,项目名称:CT74,代码行数:1,代码来源:Dask.cs


示例7: DIO_INT2_EventMessage

 public static extern short DIO_INT2_EventMessage(ushort CardNumber, short Int2Mode, long windowHandle, long message, MulticastDelegate callbackAddr);
开发者ID:legendmaker,项目名称:Apintec,代码行数:1,代码来源:Dask.cs


示例8: mg_set_uri_callback

 private static extern void mg_set_uri_callback(IntPtr ctx, string uri_regex, MulticastDelegate func, IntPtr data);
开发者ID:safebomb,项目名称:Webkey-1,代码行数:1,代码来源:mongoose.cs


示例9: Start

// ReSharper disable UnusedMember.Local
    void Start()
// ReSharper restore UnusedMember.Local
    {
        // keys
        ObjectClicked = new MulticastDelegate(Dispatcher, OBJECT_CLICKED);
    }
开发者ID:groov0v,项目名称:edriven-gui,代码行数:7,代码来源:EventDispatcherScript2.cs


示例10: mg_set_log_callback

 private static extern void mg_set_log_callback(IntPtr ctx, MulticastDelegate func);
开发者ID:safebomb,项目名称:Webkey-1,代码行数:1,代码来源:mongoose.cs


示例11: mg_set_log_callback

	[DllImport("_mongoose",CallingConvention=CallingConvention.Cdecl)] private static extern void	mg_set_log_callback(IntPtr ctx, MulticastDelegate func);
开发者ID:GotenXiao,项目名称:blink1,代码行数:1,代码来源:mongoose.cs


示例12: EqualInvocationLists

 private bool EqualInvocationLists(MulticastDelegate[] a, MulticastDelegate[] b, int start, int count)
 {
     for (int i = 0; i < count; i++)
     {
         if (!(a[start + i].Equals(b[i])))
             return false;
     }
     return true;
 }
开发者ID:afrog33k,项目名称:csnative,代码行数:9,代码来源:MulticastDelegate.cs


示例13: DIO_T2_EventMessage

 public static extern short DIO_T2_EventMessage(ushort CardNumber, short T2En, long windowHandle, uint message, MulticastDelegate callbackAddr);
开发者ID:legendmaker,项目名称:Apintec,代码行数:1,代码来源:Dask.cs


示例14: NewMulticastDelegate

        private MulticastDelegate NewMulticastDelegate(MulticastDelegate[] invocationList, int invocationCount)
        {
            MulticastDelegate result = (MulticastDelegate)this.MemberwiseClone();
            result._invocationList = invocationList;
            result._invocationCount = invocationCount;

            return result;
        }
开发者ID:afrog33k,项目名称:csnative,代码行数:8,代码来源:MulticastDelegate.cs


示例15: DO_EventCallBack

 public static extern short DO_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr);
开发者ID:legendmaker,项目名称:Apintec,代码行数:1,代码来源:Dask.cs


示例16: SetStart

		void SetStart (MulticastDelegate start, int maxStackSize)
		{
			m_Delegate = start;
			Internal.stack_size = maxStackSize;
		}
开发者ID:Numpsy,项目名称:mono,代码行数:5,代码来源:Thread.cs


示例17: FindBUilder

		public static Delegate FindBUilder (MulticastDelegate mcd)
		{
			throw new NotImplementedException ();
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:4,代码来源:DbCommandBuilder.cs


示例18: Thread_internal

		private extern IntPtr Thread_internal (MulticastDelegate start);
开发者ID:kumpera,项目名称:mono,代码行数:1,代码来源:Thread.cs


示例19: Thread_internal

		private IntPtr Thread_internal (MulticastDelegate start)
		{
			throw new System.NotImplementedException();
		}
开发者ID:tgiphil,项目名称:Mono-Class-Libraries,代码行数:4,代码来源:Thread.Mosa.cs


示例20: Start

 // ReSharper restore UnusedMember.Local
 // ReSharper disable UnusedMember.Local
 void Start()
 {
     // keys
     ObjectClicked = new MulticastDelegate(this, OBJECT_CLICKED);
 }
开发者ID:bwheatley,项目名称:edriven,代码行数:7,代码来源:EventDispatcherScript2.cs



注:本文中的MulticastDelegate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MultipartContent类代码示例发布时间:2022-05-24
下一篇:
C# MultiSourceFrameReader类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap