void RegisterBuiltInValueType <T>(ReadWriteOperations <T> operations) { ValueInstantiator instantiator = BuiltInValue <T> .CreateInstantiator(operations); ValueWrapper wrapper = BuiltInValue <T> .CreateWrapper(operations); RegisterBuiltInType(typeof(T), StandardTypeSignature.Create, instantiator, wrapper); }
public static ValueInstantiator CreateInstantiator(ReadWriteOperations <T> readWriteOperations) { return((typeManager, fullType, reader) => new BuiltInValue <T>(readWriteOperations, default(T))); }
public static ValueWrapper CreateWrapper(ReadWriteOperations <T> readWriteOperations) { return((typeManager, fullType, value) => new BuiltInValue <T>(readWriteOperations, (T)value)); }
BuiltInValue(ReadWriteOperations <T> readWriteOperations, T defaultValue) { _readWriteOperations = readWriteOperations; _value = defaultValue; }