Exemple #1
0
 internal static ScalarModel <T> NewScalar <T>(T value = default(T))
 {
     if (ScalarTypeMap.TryGetValue(typeof(T), out var stype))
     {
         return((ScalarModel <T>)Activator.CreateInstance(stype, value));
     }
     else
     {
         throw new Exception("not a scalar type");
     }
 }
Exemple #2
0
 private SchemaBuilder(Type schemaType, Dictionary <Type, IGraphTypeBuilder> builders, ScalarTypeMap scalarTypeMap)
 {
     _schemaType    = schemaType;
     _builders      = builders;
     _scalarTypeMap = scalarTypeMap;
 }
Exemple #3
0
 public GraphTypeBuilder(ScalarTypeMap scalarTypeMap) : this(new GraphTypeConfiguration <TModel> (scalarTypeMap), new SchemaBuilderCallback[0])
 {
 }