コード例 #1
0
ファイル: Descriptor.cs プロジェクト: jdaigle/LightRail
 public static bool Equals(Descriptor first, Descriptor second)
 {
     if (first == null && second == null)
     {
         return true;
     }
     if (first == null && second != null)
     {
         return false;
     }
     if (first != null && second == null)
     {
         return false;
     }
     if (first.Code == second.Code)
     {
         return true;
     }
     if (first.Name == second.Name)
     {
         return true;
     }
     return false;
 }
コード例 #2
0
ファイル: DescribedType.cs プロジェクト: jdaigle/LightRail
 protected DescribedType(Descriptor descriptor)
 {
     Descriptor = descriptor;
 }
コード例 #3
0
 private static Func<object> CompilerConstructor(Descriptor descriptor, Type describedType)
 {
     var ctor = describedType.GetConstructor(new Type[0]);
     if (ctor != null)
     {
         NewExpression newExp = Expression.New(ctor);
         LambdaExpression lambda = Expression.Lambda(typeof(Func<object>), newExp);
         return (Func<object>)lambda.Compile();
     }
     return null;
 }
コード例 #4
0
 internal static bool TryGetKnownDescribedType(ulong code, out Descriptor descriptor)
 {
     return knownDescribedTypeDescriptors.TryGetValue(code, out descriptor);
 }
コード例 #5
0
 internal static bool IsKnownDescribedType(Descriptor descriptor)
 {
     return knownDescribedTypeDescriptors.ContainsKey(descriptor.Code);
 }
コード例 #6
0
ファイル: AmqpFrame.cs プロジェクト: jdaigle/LightRail
 protected AmqpFrame(Descriptor descriptor)
     : base(descriptor)
 {
 }
コード例 #7
0
ファイル: DeliveryState.cs プロジェクト: jdaigle/LightRail
 protected DeliveryState(Descriptor descriptor)
     : base(descriptor)
 {
 }
コード例 #8
0
 internal static bool TryGetKnownDescribedType(ulong code, out Descriptor descriptor)
 {
     return(knownDescribedTypeDescriptors.TryGetValue(code, out descriptor));
 }
コード例 #9
0
 internal static bool IsKnownDescribedType(Descriptor descriptor)
 {
     return(knownDescribedTypeDescriptors.ContainsKey(descriptor.Code));
 }
コード例 #10
0
ファイル: DescribedList.cs プロジェクト: jdaigle/LightRail
 protected DescribedList(Descriptor descriptor)
     : base(descriptor)
 {
 }