Beispiel #1
0
        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);
        }
Beispiel #2
0
 public static ValueInstantiator CreateInstantiator(ReadWriteOperations <T> readWriteOperations)
 {
     return((typeManager, fullType, reader) => new BuiltInValue <T>(readWriteOperations, default(T)));
 }
Beispiel #3
0
 public static ValueWrapper CreateWrapper(ReadWriteOperations <T> readWriteOperations)
 {
     return((typeManager, fullType, value) => new BuiltInValue <T>(readWriteOperations, (T)value));
 }
Beispiel #4
0
 BuiltInValue(ReadWriteOperations <T> readWriteOperations, T defaultValue)
 {
     _readWriteOperations = readWriteOperations;
     _value = defaultValue;
 }