/// <summary> /// Sets the Cosmos Container to hold the leases state /// </summary> /// <param name="leaseContainer">Instance of a Cosmos Container to hold the leases.</param> /// <returns>The instance of <see cref="ChangeFeedProcessorBuilder"/> to use.</returns> public virtual ChangeFeedProcessorBuilder WithCosmosLeaseContainer(CosmosContainer leaseContainer) { if (leaseContainer == null) { throw new ArgumentNullException(nameof(leaseContainer)); } if (this.leaseContainer != null) { throw new InvalidOperationException("The builder already defined a lease container."); } if (this.LeaseStoreManager != null) { throw new InvalidOperationException("The builder already defined an in-memory lease container instance."); } this.leaseContainer = (CosmosContainerCore)leaseContainer; return(this); }
/// <summary> /// Create a <see cref="CosmosUserDefinedFunctions"/> /// </summary> /// <param name="container">The <see cref="CosmosContainer"/> the user defined function set is related to.</param> protected internal CosmosUserDefinedFunctions(CosmosContainer container) { this.container = container; this.client = container.Client; }
/// <summary> /// Create a <see cref="CosmosStoredProcedures"/> /// </summary> /// <param name="container">The <see cref="CosmosContainer"/> the stored procedures set is related to.</param> protected internal CosmosStoredProcedures(CosmosContainer container) { this.container = container; this.client = container.Client; }
/// <summary> /// Create a <see cref="CosmosTriggers"/> /// </summary> /// <param name="container">The <see cref="CosmosContainer"/> the triggers set is related to.</param> protected internal CosmosTriggers(CosmosContainer container) { this.container = container; this.client = container.Client; }
/// <summary> /// A private constructor to ensure the factory is used to create the object. /// This will prevent memory leaks when handling the HttpResponseMessage /// </summary> private CosmosContainerResponse( CosmosResponseMessage cosmosResponse, CosmosContainer container) : base(cosmosResponse) { this.Container = container; }