Gibbed.RED.FileFormats.Game.GenericObject.SetProperty C# (CSharp) Method

SetProperty() public method

public SetProperty ( string name, string type, object value ) : void
name string
type string
value object
return void
        public void SetProperty(string name, string type, object value)
        {
            _propertyValues.Add(name, new PropertyValue(type, value));
        }

Usage Example

示例#1
0
 private static void ReadGenericObjectProperty(GenericObject target, IFileStream stream, string type, uint size, string name)
 {
     IPropertySerializer serializer = GetSerializer(type);
     if (serializer != null)
     {
         target.SetProperty(name, type, serializer.Deserialize(stream));
     }
     else
     {
         uint valueSize = size - 4;
         byte[] value = new byte[valueSize];
         stream.SerializeValue(ref value, valueSize);
         target.SetProperty(name, type, value);
     }
 }