public CosmosDbUserRepository(ICosmosDbOptions options, IMemoryCache cache, IValidatorProvider validatorProvider, IDocumentExpanderProvider expanderProvider = null, IDocumentSubscriptionProvider subscriptionProvider = null, IDataProtectionProvider dataProtectionProvider = null) : base(options, validatorProvider, expanderProvider, subscriptionProvider, dataProtectionProvider, cache) { }
protected CosmosDbBaseRepository(ICosmosDbOptions cosmosOptions) { this.cosmosOptions = cosmosOptions ?? throw new ArgumentNullException(nameof(cosmosOptions)); cosmosClient = new Lazy <CosmosClient>(() => new CosmosClientBuilder(cosmosOptions.ConnectionString) .WithSerializerOptions(new CosmosSerializationOptions { PropertyNamingPolicy = CosmosPropertyNamingPolicy.CamelCase }) .Build()); }
public static CosmosDbContainerFactory Get(ICosmosDbOptions options) { if (options is null) { throw new ArgumentNullException(nameof(options)); } var key = $"{options.DatabaseName}@{options.ConnectionString}"; return(containerFactories.GetOrAdd(key, _ => new CosmosDbContainerFactory(options))); }
private CosmosDbContainerFactory(ICosmosDbOptions options) { this.options = options ?? throw new ArgumentNullException(nameof(options)); client = new Lazy <CosmosClient>(() => { var builder = new CosmosClientBuilder(options.ConnectionString) .WithSerializerOptions(new CosmosSerializationOptions { PropertyNamingPolicy = CosmosPropertyNamingPolicy.CamelCase }); return(builder.Build()); }); }
protected CosmosDbRepository(ICosmosDbOptions options, IValidatorProvider validatorProvider = null, IDocumentExpanderProvider expanderProvider = null, IDocumentSubscriptionProvider subscriptionProvider = null, IDataProtectionProvider dataProtectionProvider = null, IMemoryCache memoryCache = null) { Options = options ?? throw new ArgumentNullException(nameof(options)); this.validatorProvider = validatorProvider ?? NullValidatorProvider.Instance; this.expanderProvider = expanderProvider ?? NullExpanderProvider.Instance; this.subscriptionProvider = subscriptionProvider ?? NullSubscriptionProvider.Instance; this.memoryCache = memoryCache; cosmosClient = new Lazy <CosmosClient>(() => new CosmosClient(options.ConnectionString, new CosmosClientOptions() { Serializer = new CosmosDbSerializer(dataProtectionProvider) })); }
public CosmosDbUserRepository(ICosmosDbOptions cosmosOptions) : base(cosmosOptions) { }
public CosmosDbProjectRepository(ICosmosDbOptions cosmosOptions, IUserRepository userRepository, IProjectLinkRepository projectLinkRepository) : base(cosmosOptions) { this.userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); this.projectLinkRepository = projectLinkRepository ?? throw new ArgumentNullException(nameof(projectLinkRepository)); }
public CosmosDbProjectsRepository(ICosmosDbOptions cosmosOptions) : base(cosmosOptions) { }
public CosmosDbComponentRepository(ICosmosDbOptions options, IMemoryCache cache, IComponentTaskRepository componentTaskRepository, IValidatorProvider validatorProvider, IDocumentExpanderProvider expanderProvider = null, IDocumentSubscriptionProvider subscriptionProvider = null, IDataProtectionProvider dataProtectionProvider = null) : base(options, validatorProvider, expanderProvider, subscriptionProvider, dataProtectionProvider, cache) { this.componentTaskRepository = componentTaskRepository ?? throw new ArgumentNullException(nameof(componentTaskRepository)); }
public CosmosDbTeamCloudRepository(ICosmosDbOptions cosmosOptions) { containerFactory = CosmosDbContainerFactory.Get(cosmosOptions); }
public CosmosDbProviderDataRepository(ICosmosDbOptions cosmosOptions) : base(cosmosOptions) { }
public CosmosDbProjectTypesRepository(ICosmosDbOptions cosmosOptions, IProjectsRepository projectRepository) : base(cosmosOptions) { this.projectRepository = projectRepository ?? throw new ArgumentNullException(nameof(projectRepository)); }
public CosmosDbProjectsRepository(ICosmosDbOptions cosmosOptions) { containerFactory = CosmosDbContainerFactory.Get(cosmosOptions); }
public CosmosDbTeamCloudRepository(ICosmosDbOptions cosmosOptions, IContainerDocumentCache cache) : base(cosmosOptions) { this.cache = cache ?? throw new ArgumentNullException(nameof(cache)); }
public CosmosDbProjectsRepository(ICosmosDbOptions cosmosOptions, IUsersRepository usersRepository) : base(cosmosOptions) { this.usersRepository = usersRepository ?? throw new ArgumentNullException(nameof(usersRepository)); }
public CosmosDbTeamCloudRepository(ICosmosDbOptions cosmosOptions) : base(cosmosOptions) { }
public CosmosDbProjectTemplateRepository(ICosmosDbOptions options, IValidatorProvider validatorProvider, IRepositoryService repositoryService, IMemoryCache cache, IDocumentExpanderProvider expanderProvider = null, IDocumentSubscriptionProvider subscriptionProvider = null, IDataProtectionProvider dataProtectionProvider = null) : base(options, validatorProvider, expanderProvider, subscriptionProvider, dataProtectionProvider, cache) { this.repositoryService = repositoryService ?? throw new ArgumentNullException(nameof(repositoryService)); }
public CosmosDbDeploymentScopeRepository(ICosmosDbOptions options, IMemoryCache cache, IValidatorProvider validatorProvider = null, IDocumentExpanderProvider expanderProvider = null, IDocumentSubscriptionProvider subscriptionProvider = null, IDataProtectionProvider dataProtectionProvider = null) : base(options, validatorProvider, expanderProvider, subscriptionProvider, dataProtectionProvider, cache) { this.cache = cache ?? throw new ArgumentNullException(nameof(cache)); }
public CosmosDbComponentRepository(ICosmosDbOptions cosmosOptions) : base(cosmosOptions) { }