Beispiel #1
0
 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;
 }
Beispiel #2
0
 protected DescribedType(Descriptor descriptor)
 {
     Descriptor = descriptor;
 }
 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;
 }
 internal static bool TryGetKnownDescribedType(ulong code, out Descriptor descriptor)
 {
     return knownDescribedTypeDescriptors.TryGetValue(code, out descriptor);
 }
 internal static bool IsKnownDescribedType(Descriptor descriptor)
 {
     return knownDescribedTypeDescriptors.ContainsKey(descriptor.Code);
 }
Beispiel #6
0
 protected AmqpFrame(Descriptor descriptor)
     : base(descriptor)
 {
 }
Beispiel #7
0
 protected DeliveryState(Descriptor descriptor)
     : base(descriptor)
 {
 }
Beispiel #8
0
 internal static bool TryGetKnownDescribedType(ulong code, out Descriptor descriptor)
 {
     return(knownDescribedTypeDescriptors.TryGetValue(code, out descriptor));
 }
Beispiel #9
0
 internal static bool IsKnownDescribedType(Descriptor descriptor)
 {
     return(knownDescribedTypeDescriptors.ContainsKey(descriptor.Code));
 }
Beispiel #10
0
 protected DescribedList(Descriptor descriptor)
     : base(descriptor)
 {
 }