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; }
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); }
protected AmqpFrame(Descriptor descriptor) : base(descriptor) { }
protected DeliveryState(Descriptor descriptor) : base(descriptor) { }
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)); }
protected DescribedList(Descriptor descriptor) : base(descriptor) { }