public static IServiceCollection AddScimCore(this IServiceCollection services, List <Representation> representations = null, List <Schema> schemas = null) { if (services == null) { throw new ArgumentNullException(nameof(services)); } services.AddTransient <IRepresentationRequestParser, RepresentationRequestParser>(); services.AddTransient <IJsonParser, RepresentationRequestParser>(); services.AddTransient <IRepresentationResponseParser, RepresentationResponseParser>(); services.AddTransient <IPatchRequestParser, PatchRequestParser>(); services.AddTransient <ISearchParameterParser, SearchParameterParser>(); services.AddTransient <IFilterParser, FilterParser>(); services.AddTransient <IBulkRequestParser, BulkRequestParser>(); services.AddTransient <IAddRepresentationAction, AddRepresentationAction>(); services.AddTransient <IGetRepresentationAction, GetRepresentationAction>(); services.AddTransient <IDeleteRepresentationAction, DeleteRepresentationAction>(); services.AddTransient <IUpdateRepresentationAction, UpdateRepresentationAction>(); services.AddTransient <IPatchRepresentationAction, PatchRepresentationAction>(); services.AddTransient <IGetRepresentationsAction, GetRepresentationsAction>(); services.AddTransient <IBulkAction, BulkAction>(); services.AddTransient <IGroupsAction, GroupsAction>(); services.AddTransient <IUsersAction, UsersAction>(); services.AddTransient <IApiResponseFactory, ApiResponseFactory>(); services.AddTransient <IErrorResponseFactory, ErrorResponseFactory>(); services.AddTransient <ICommonAttributesFactory, CommonAttributesFactory>(); services.AddTransient <IParametersValidator, ParametersValidator>(); services.AddTransient <ITransformers, Transformers>(); var schemaStore = new DefaultSchemaStore(schemas); services.AddSingleton <IRepresentationStore>(new DefaultRepresentationStore(representations, schemaStore)); services.AddSingleton <ISchemaStore>(schemaStore); return(services); }
public StoresFixture() { SchemaStore = new DefaultSchemaStore(new System.Collections.Generic.List <EF.Models.Schema> { DefaultSchemas.GroupSchema, DefaultSchemas.UserSchema }); }