public StructureSchemas(IStructureTypeFactory structureTypeFactory, IStructureSchemaBuilder structureSchemaBuilder)
        {
            Ensure.That(structureTypeFactory, "structureTypeFactory").IsNotNull();
            Ensure.That(structureSchemaBuilder, "StructureSchemaBuilder").IsNotNull();

            StructureTypeFactory   = structureTypeFactory;
            StructureSchemaBuilder = structureSchemaBuilder;
            _schemas = new ConcurrentDictionary <Type, IStructureSchema>();

            _schemaFactoryFn = t => StructureSchemaBuilder.CreateSchema(StructureTypeFactory.CreateFor(t));
        }
Пример #2
0
 internal static IStructureSchema CreateRealFrom <T>() where T : class
 {
     return(StructureSchemaBuilder.CreateSchema(StructureTypeFactory.CreateFor <T>()));
 }