public static Type GetTypeForSchema(this ISchemaTypeMap typeMap, Schema schema) { Type type; if (!typeMap.TryGetTypeForSchema(schema, out type)) { throw new MissingTypeMappingException(schema); } return(type); }
public static Schema GetSchemaForType(this ISchemaTypeMap typeMap, Type type) { Schema schema; if (!typeMap.TryGetSchemaForType(type, out schema)) { throw new MissingTypeMappingException(schema); } return(schema); }
public RecordSerializer(ISchemaProvider schemaProvider, ISchemaTypeMap schemaTypeMap, IEditableFactory editableFactory) { this.schemaProvider = schemaProvider; this.schemaTypeMap = schemaTypeMap; this.editableFactory = editableFactory; }
public ReflectionSchemaBuilder(ISchemaProvider schemaProvider, IEditableFactory editableFactory, ISchemaTypeMap schemaTypeMap) { this.schemaProvider = schemaProvider; this.editableFactory = editableFactory; this.typeMap = schemaTypeMap; }
public static void MapBidirectional(this ISchemaTypeMap typeMap, string schemaName, Type type) { typeMap.MapBidirectional(typeMap.SchemaProvider.GetSchemaByName(schemaName), type); }
public static void MapBidirectional(this ISchemaTypeMap typeMap, BuiltInSchema builtInSchema, Type type) { typeMap.MapBidirectional(Schema.BuiltIn[builtInSchema], type); }
public static void MapBidirectional(this ISchemaTypeMap typeMap, Schema schema, Type type) { typeMap.MapSchema(schema, type); typeMap.MapType(type, schema); }