コード例 #1
0
ファイル: UltimaPacketValue.cs プロジェクト: Ben1028/SpyUO
        /// <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 ) );
        }
コード例 #2
0
        /// <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));
            }
        }
コード例 #3
0
 /// <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);
 }
コード例 #4
0
 /// <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 );
 }