public BulkRequestParser(
     IErrorResponseFactory errorResponseFactory,
     ISchemaStore schemaStore)
 {
     _errorResponseFactory = errorResponseFactory;
     _schemaStore          = schemaStore;
 }
Esempio n. 2
0
 public RepresentationResponseParser(
     ISchemaStore schemaStore,
     ICommonAttributesFactory commonAttributeFactory)
 {
     _schemasStore            = schemaStore;
     _commonAttributesFactory = commonAttributeFactory;
 }
Esempio n. 3
0
 public ManageController(IDatasetStore datasetStore,
                         ISchemaStore schemaStore,
                         IHubContext <ProgressHub> progresseHubContext)
 {
     _datasetStore        = datasetStore;
     _schemaStore         = schemaStore;
     _progresseHubContext = progresseHubContext;
 }
Esempio n. 4
0
        public static ResultState <TItem> GetResultState(ISchemaStore schemas, TableIdentity heading)
        {
            return((ResultState <TItem>)factoryMap.GetOrAdd(heading, _ =>
            {
                TypeState state = GetTypeState(schemas);

                return new ResultCompiler(state).Compile <TItem>(heading);
            }));
        }
Esempio n. 5
0
 public AccountController(IUserStore userStore,
                          IOwnerSettingsStore ownerSettingsStore,
                          IRepoSettingsStore repoSettingsStore,
                          IDatasetStore datasetStore,
                          IJobStore jobStore,
                          ISchemaStore schemaStore)
 {
     _userStore          = userStore;
     _ownerSettingsStore = ownerSettingsStore;
     _repoSettingsStore  = repoSettingsStore;
     _datasetStore       = datasetStore;
     _jobStore           = jobStore;
     _schemaStore        = schemaStore;
 }
        public static ISchemaStore Use(this ISchemaStore store, IRelationContractResolver resolver)
        {
            if (store == null)
            {
                throw new ArgumentNullException(nameof(store));
            }

            if (resolver == null)
            {
                throw new ArgumentNullException(nameof(resolver));
            }

            RelationMetadataBuilder builder = store.Builders.FirstOfType <RelationMetadataBuilder>();

            builder?.Add(resolver);

            return(store);
        }
Esempio n. 7
0
        private static TypeState GetTypeState(ISchemaStore schemas)
        {
            if (typeState != null)
            {
                return(typeState);
            }

            lock (typeLock)
            {
                if (typeState != null)
                {
                    return(typeState);
                }

                Type listType = typeof(IList <>).MakeGenericType(typeof(TItem));

                ISchema schema = schemas.GetSchema(listType);

                return(typeState = new TypeState(schema));
            }
        }
Esempio n. 8
0
        public static void AddContract(this ISchemaStore schemas, IRelationContractResolver contract)
        {
            if (schemas == null)
            {
                throw new ArgumentNullException(nameof(schemas));
            }

            if (contract == null)
            {
                throw new ArgumentNullException(nameof(contract));
            }

            RelationMetadataBuilder builder = schemas.OfType <RelationMetadataBuilder>().FirstOrDefault();

            if (builder == null)
            {
                throw new InvalidOperationException("No relation metadata builder found.");
            }

            builder.Add(contract);
        }
Esempio n. 9
0
 public ResultAdapter(ISchemaStore schemas)
 {
     this.Schemas = schemas ?? throw new ArgumentNullException(nameof(schemas));
 }
 public CommonAttributesFactory(ISchemaStore schemaStore)
 {
     _schemaStore = schemaStore;
 }
Esempio n. 11
0
 public static ISchema Describe <T>(this ISchemaStore store)
 => store.GetSchema(typeof(T));
 public static TMetadata Lookup <TModel, TMetadata>(this ISchemaStore store, string name)
     where TMetadata : IMetadata
 => store.GetSchema(typeof(TModel)).Lookup <TMetadata>(name);
Esempio n. 13
0
 public SchemasController(ISchemaStore schemaStore)
 {
     _schemaStore = schemaStore;
 }
 public static ITuple Lookup <TModel>(this ISchemaStore store, TModel model, IEnumerable <string> header)
 => new Model(store.GetSchema(typeof(TModel)), model).Lookup(header);
 public RepresentationRequestParser(ISchemaStore schemaStore)
 {
     _schemasStore = schemaStore;
 }
Esempio n. 16
0
 public ImportSchemaProcessor(WorkerConfiguration configuration, ISchemaStore schemaStore, IFileStore jobFileStore)
 {
     _schemaStore   = schemaStore;
     _jobFileStore  = jobFileStore;
     _configuration = configuration;
 }
 public DefaultRepresentationStore(List <Model.Representation> representations, ISchemaStore schemaStore)
 {
     _representations = representations == null ? new List <Model.Representation>() : representations;
     _transformers    = new Transformers();
     _schemaStore     = schemaStore;
 }
Esempio n. 18
0
 public static Parameter Create <TValue>(ISchemaStore store, string parameterName, TValue value) => new Parameter(parameterName, Model.Create(store, value));
 public static ITuple Lookup <TModel>(this ISchemaStore store, TModel model, params string[] header)
 => new Model(store.GetSchema(typeof(TModel)), model).Lookup(header);
Esempio n. 20
0
 public TemplatesViewComponent(ISchemaStore schemaStore)
 {
     _schemaStore = schemaStore;
 }
Esempio n. 21
0
 public RepresentationResponseParser(ISchemaStore schemaStore, ICommonAttributesFactory commonAttributeFactory, IEnumerable <IAttributeMapper> attributeMappers)
 {
     _schemasStore            = schemaStore;
     _commonAttributesFactory = commonAttributeFactory;
     _attributeMappers        = attributeMappers;
 }
 public static IField Lookup <TModel>(this ISchemaStore store, TModel model, string attributeName)
 => new Model(store.GetSchema(typeof(TModel)), model).Lookup(attributeName);
 public RepresentationResponseParserFixture(StoresFixture stores)
 {
     _schemaStore = stores.SchemaStore;
 }
Esempio n. 24
0
 public CommandBuffer(ISchemaStore store)
 {
     this.Store = store;
 }
Esempio n. 25
0
 public OwnerController(IOwnerSettingsStore ownerSettingsStore, IImportService importService, ISchemaStore schemaStore)
 {
     _ownerSettingsStore = ownerSettingsStore;
     _importService      = importService;
     _schemaStore        = schemaStore;
 }
 public static IField From <TModel>(this ISchemaStore store, TModel model)
 => new Model(store.GetSchema(typeof(TModel)), model);
 public static ISchema GetSchema <TModel>(this ISchemaStore store)
 => store.GetSchema(typeof(TModel));
Esempio n. 28
0
 internal QueryReader(DbDataReader dataReader, ISchemaStore schemas)
 {
     this.syncReader = this.asyncReader = dataReader ?? throw new ArgumentNullException(nameof(dataReader));
     this.schemas    = schemas ?? throw new ArgumentNullException(nameof(schemas));
 }
Esempio n. 29
0
 public DeleteSchemaProcessor(ISchemaStore schemaStore)
 {
     _schemaStore = schemaStore;
 }
 public static RelationHeader <TModel> For <TModel>(this ISchemaStore store)
 => new RelationHeader <TModel>(store.GetSchema(typeof(TModel)));