BasePersistentFieldAttribute Class |
Namespace: KSPDev.ConfigUtils
The BasePersistentFieldAttribute type exposes the following members.
| Name | Description | |
|---|---|---|
| BasePersistentFieldAttribute | Initializes a new instance of the BasePersistentFieldAttribute class |
| Name | Description | |
|---|---|---|
| collectionTypeProto | A proto that handles field's value as a collection of persistent values. | |
| ordinaryTypeProto | A proto that (de)serializes field's value as a simple string. |
| Name | Description | |
|---|---|---|
| group | A tag for a group of fields. | |
| path | Relative path to the value or node. Case-insensitive. |
See more examples in PersistentFieldsFileAttribute.
class MyTypeAttribute : AbstractPersistentFieldAttribute { public MyTypeAttribute(string cfgPath) : base(cfgPath) { ordinaryTypeProto = typeof(PrimitiveTypesProto); } } class MyTypesCollectionAttribute : AbstractPersistentFieldAttribute { public MyTypesCollectionAttribute(string cfgPath) : base(cfgPath) { ordinaryTypeProto = typeof(PrimitiveTypesProto); collectionTypeProto = typeof(GenericCollectionTypeProto); } }