public static SerializableType CreateDescribedListType( AmqpSerializer serializer, Type type, SerializableType baseType, string descriptorName, ulong? descriptorCode, SerialiableMember[] members, Dictionary<Type, SerializableType> knownTypes, MethodAccessor[] serializationCallbacks) { return new DescribedListType(serializer, type, baseType, descriptorName, descriptorCode, members, knownTypes, serializationCallbacks); }
protected override int ReadMemberValue(ByteBuffer buffer, SerialiableMember serialiableMember, object container) { string key = Encoder.ReadString(buffer, Encoder.ReadFormatCode(buffer)); SerialiableMember member = null; if (!this.membersMap.TryGetValue(key, out member)) { throw new SerializationException("Unknown key name " + key); } object value = member.Type.ReadObject(buffer); member.Accessor.Set(container, value); return 2; }
public DescribedSimpleMapType( AmqpSerializer serializer, Type type, SerializableType baseType, SerialiableMember[] members, MethodAccessor[] serializationCallbacks) : base(serializer, type, baseType, null, null, members, null, serializationCallbacks) { this.membersMap = new Dictionary<string, SerialiableMember>(); foreach (SerialiableMember member in members) { this.membersMap.Add(member.Name, member); } }
protected override int ReadMemberValue(ByteBuffer buffer, SerialiableMember serialiableMember, object container) { object value = serialiableMember.Type.ReadObject(buffer); serialiableMember.Accessor.Set(container, value); return 1; }
public DescribedMapType( AmqpSerializer serializer, Type type, SerializableType baseType, string descriptorName, ulong? descriptorCode, SerialiableMember[] members, Dictionary<Type, SerializableType> knownTypes, MethodAccessor[] serializationCallbacks) : base(serializer, type, baseType, descriptorName, descriptorCode, members, knownTypes, serializationCallbacks) { this.membersMap = new Dictionary<string, SerialiableMember>(); foreach(SerialiableMember member in members) { this.membersMap.Add(member.Name, member); } }
protected abstract int ReadMemberValue(ByteBuffer buffer, SerialiableMember serialiableMember, object container);
protected DescribedCompoundType( AmqpSerializer serializer, Type type, SerializableType baseType, string descriptorName, ulong? descriptorCode, SerialiableMember[] members, Dictionary<Type, SerializableType> knownTypes, MethodAccessor[] serializationCallbacks) : base(serializer, type) { this.baseType = (DescribedCompoundType)baseType; this.descriptorName = descriptorName; this.descriptorCode = descriptorCode; this.members = members; this.serializationCallbacks = serializationCallbacks; this.knownTypes = GetKnownTypes(knownTypes); }
public static SerializableType CreateDescribedSimpleMapType( AmqpSerializer serializer, Type type, SerializableType baseType, SerialiableMember[] members, MethodAccessor[] serializationCallbacks) { return new DescribedSimpleMapType(serializer, type, baseType, members, serializationCallbacks); }
public DescribedListType( AmqpSerializer serializer, Type type, SerializableType baseType, string descriptorName, ulong? descriptorCode, SerialiableMember[] members, Dictionary<Type, SerializableType> knownTypes, MethodAccessor onDesrialized) : base(serializer, type, baseType, descriptorName, descriptorCode, members, knownTypes, onDesrialized) { }
public DescribedSimpleListType( AmqpSerializer serializer, Type type, SerializableType baseType, SerialiableMember[] members, MethodAccessor[] serializationCallbacks) : base(serializer, type, baseType, null, null, members, null, serializationCallbacks) { }