コード例 #1
0
ファイル: SerializableDictionary.cs プロジェクト: nanze81/bsf
 /// <summary>
 /// Constructor for use by the runtime only.
 /// </summary>
 /// <param name="keyType">C# type of the keys in the dictionary.</param>
 /// <param name="valueType">C# type of the values in the dictionary.</param>
 /// <param name="parentProperty">Property used for retrieving this entry.</param>
 private SerializableDictionary(Type keyType, Type valueType, SerializableProperty parentProperty)
 {
     this.parentProperty = parentProperty;
     this.keyType        = keyType;
     this.valueType      = valueType;
     keyPropertyType     = SerializableProperty.DetermineFieldType(keyType);
     valuePropertyType   = SerializableProperty.DetermineFieldType(valueType);
 }
コード例 #2
0
 /// <summary>
 /// Constructor for internal use by the runtime.
 /// </summary>
 /// <param name="parent">Object that conains the field.</param>
 /// <param name="name">Name of the field.</param>
 /// <param name="flags">Flags that control whether the field is inspectable or serializable.</param>
 /// <param name="internalType">Internal C# type of the field.</param>
 private SerializableField(SerializableObject parent, string name, int flags, Type internalType)
 {
     this.parent       = parent;
     this.name         = name;
     this.flags        = flags;
     this.type         = SerializableProperty.DetermineFieldType(internalType);
     this.internalType = internalType;
 }
コード例 #3
0
 /// <summary>
 /// Constructor for use by the runtime only.
 /// </summary>
 /// <param name="elementType">C# type of the elements in the list.</param>
 /// <param name="parentProperty">Property used for retrieving this entry.</param>
 private SerializableList(Type elementType, SerializableProperty parentProperty)
 {
     this.parentProperty = parentProperty;
     this.elementType    = elementType;
     elementPropertyType = SerializableProperty.DetermineFieldType(elementType);
 }