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"); } }
private SchemaBuilder(Type schemaType, Dictionary <Type, IGraphTypeBuilder> builders, ScalarTypeMap scalarTypeMap) { _schemaType = schemaType; _builders = builders; _scalarTypeMap = scalarTypeMap; }
public GraphTypeBuilder(ScalarTypeMap scalarTypeMap) : this(new GraphTypeConfiguration <TModel> (scalarTypeMap), new SchemaBuilderCallback[0]) { }