/// <summary> /// Constructs a new instance of UltimaPacketValue. /// </summary> /// <param name="definition">Class definition.</param> /// <param name="obj">Packet child.</param> public UltimaPacketValue( UltimaPacketClassDefinition definition, object obj ) { _Object = obj; _Definition = definition; _Properties = new List<UltimaPacketPropertyValue>(); foreach ( UltimaPacketPropertyDefinition d in _Definition.Properties ) _Properties.Add( new UltimaPacketPropertyValue( d, this ) ); }
/// <summary> /// Constructs a new instance of UltimaPacketValue. /// </summary> /// <param name="definition">Class definition.</param> /// <param name="obj">Packet child.</param> public UltimaPacketValue(UltimaPacketClassDefinition definition, object obj) { _Object = obj; _Definition = definition; _Properties = new List <UltimaPacketPropertyValue>(); foreach (UltimaPacketPropertyDefinition d in _Definition.Properties) { _Properties.Add(new UltimaPacketPropertyValue(d, this)); } }
/// <summary> /// Constructs a new instance of UltimaPacketListPropertyDefinition. /// </summary> /// <param name="info">Property info.</param> /// <param name="getter">Public getter for property.</param> /// <param name="attribute">Object property attribute.</param> /// <param name="childType">Property child type.</param> public UltimaPacketListPropertyDefinition(PropertyInfo info, UltimaPacketPropertyGetter getter, UltimaPacketPropertyAttribute attribute, Type childType) : base(info, getter, attribute) { _ChildDefinition = new UltimaPacketClassDefinition(childType); }
/// <summary> /// Constructs a new instance of UltimaPacketListPropertyDefinition. /// </summary> /// <param name="info">Property info.</param> /// <param name="getter">Public getter for property.</param> /// <param name="attribute">Object property attribute.</param> /// <param name="childType">Property child type.</param> public UltimaPacketListPropertyDefinition( PropertyInfo info, UltimaPacketPropertyGetter getter, UltimaPacketPropertyAttribute attribute, Type childType ) : base(info, getter, attribute) { _ChildDefinition = new UltimaPacketClassDefinition( childType ); }