當前位置: 首頁>>代碼示例>>C#>>正文


C# Delegate.CombineImpl方法代碼示例

本文整理匯總了C#中System.Delegate.CombineImpl方法的典型用法代碼示例。如果您正苦於以下問題:C# Delegate.CombineImpl方法的具體用法?C# Delegate.CombineImpl怎麽用?C# Delegate.CombineImpl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Delegate的用法示例。


在下文中一共展示了Delegate.CombineImpl方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Combine

        public static Delegate Combine(Delegate a, Delegate b)
        {
            if ((Object)a == null)
                return b;

            return a.CombineImpl(b);
        }
開發者ID:afrog33k,項目名稱:csnative,代碼行數:7,代碼來源:Delegate.cs

示例2: Combine

        public static Delegate Combine(Delegate a, Delegate b)
        {
            if (a == null) {
                return b;
            } else if (b == null) {
                return a;
            }

            if (a.GetType() != b.GetType()) {
                throw new ArgumentException("Incompatible delegate types");
            }

            return a.CombineImpl(b);
        }
開發者ID:memsom,項目名稱:dotNetAnywhere-wb,代碼行數:14,代碼來源:Delegate.cs

示例3: Combine

        public static Delegate Combine(Delegate a, Delegate b)
        {
            if ((Object)a == null) // cast to object for a more efficient test
                return b;

            return  a.CombineImpl(b);
        }
開發者ID:nlh774,項目名稱:DotNetReferenceSource,代碼行數:7,代碼來源:Delegate.cs

示例4: Combine

		/// <symmary>
		///   Returns a new MulticastDelegate holding the
		///   concatenated invocation lists of MulticastDelegates a and b
		/// </symmary>
		public static Delegate Combine (Delegate a, Delegate b)
		{
			if (a == null) {
				if (b == null)
					return null;
				return b;
			} else 
				if (b == null)
					return a;

			if (a.GetType () != b.GetType ())
				throw new ArgumentException (Locale.GetText ("Incompatible Delegate Types. First is {0} second is {1}.", a.GetType ().FullName, b.GetType ().FullName));
			
			return a.CombineImpl (b);
		}
開發者ID:KonajuGames,項目名稱:SharpLang,代碼行數:19,代碼來源:Delegate.cs

示例5: Combine

        public unsafe static Delegate Combine(Delegate a, Delegate b)
        {
            if (a == null)
                return b;
            if (b == null)
                return a;

            return a.CombineImpl(b);
        }
開發者ID:pgavlin,項目名稱:corert,代碼行數:9,代碼來源:Delegate.cs

示例6: Combine

		public static Delegate Combine(Delegate a, Delegate b)
		{
			if (a == null)
			{
				return b;
			}
			return a.CombineImpl(b);
		}
開發者ID:ChristianWulf,項目名稱:CSharpKDMDiscoverer,代碼行數:8,代碼來源:Delegate.cs

示例7: Combine

		/// <symmary>
		///   Returns a new MulticastDelegate holding the
		///   concatenated invocation lists of MulticastDelegates a and b
		/// </symmary>
		public static Delegate Combine (Delegate a, Delegate b)
		{
			if (a == null) {
				if (b == null)
					return null;
				return b;
			} else 
				if (b == null)
					return a;

			if (a.GetType () != b.GetType ())
				throw new ArgumentException (Locale.GetText ("Incompatible Delegate Types."));
			
			return a.CombineImpl (b);
		}
開發者ID:Bewolf2,項目名稱:GenesisMono,代碼行數:19,代碼來源:Delegate.cs

示例8: Combine

 // Combine creates a new delegate based upon the contents of the 
 //  delegates passed in.
 /// <include file='doc\Delegate.uex' path='docs/doc[@for="Delegate.Combine"]/*' />
 public static Delegate Combine(Delegate a, Delegate b)
 {
             
             // boundry conditions -- if either (or both) delegates is null
             //      return the other.
     if (a == null)
         return b;
     if (b == null)
         return a;
             
             // Verify that the types are the same...
     if (a.GetType() != b.GetType())
         throw new ArgumentException(Environment.GetResourceString("Arg_DlgtTypeMis"));
     return  a.CombineImpl(b);
 }
開發者ID:ArildF,項目名稱:masters,代碼行數:18,代碼來源:delegate.cs

示例9: Combine

 public static Delegate Combine(Delegate a, Delegate b)
 {
     // boundry conditions -- if either (or both) delegates is null
     //      return the other.
     if ((Object)a == null) // cast to object for a more efficient test
         return b;
     if ((Object)b == null) // cast to object for a more efficient test
         return a;
             
     if (!InternalEqualTypes(a, b))
         throw new ArgumentException(Environment.GetResourceString("Arg_DlgtTypeMis"));
     
     return  a.CombineImpl(b);
 }
開發者ID:gbarnett,項目名稱:shared-source-cli-2.0,代碼行數:14,代碼來源:delegate.cs


注:本文中的System.Delegate.CombineImpl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。