### Get Database Throughput Example Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.database.readthroughputasync Demonstrates how to retrieve the provisioned throughput for a database instance. ```C# int? throughput = await database.ReadThroughputAsync(); ``` -------------------------------- ### Configure CosmosClient with Gateway Mode Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.connectionmode Example of initializing a CosmosClient with the ConnectionMode set to Gateway. ```C# CosmosClient client = new CosmosClient(connectionString, new CosmosClientOptions { ConnectionMode = ConnectionMode.Gateway }); ``` -------------------------------- ### Usage Example for WithParameterStream Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.querydefinition.withparameterstream Demonstrates how to initialize a QueryDefinition and attach a stream parameter to a SQL query. ```C# QueryDefinition query = new QueryDefinition( "select * from t where t.Account = @account") .WithParameterStream("@account", streamValue); ``` -------------------------------- ### Delete a User Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.user.deleteasync Example showing how to retrieve a user and delete it asynchronously. ```C# User user = this.database.GetUser("userId"); UserResponse response = await user.DeleteUserAsync(); ``` -------------------------------- ### Set ResolutionPath example Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.conflictresolutionpolicy.resolutionpath Example of assigning a path to the ConflictResolutionPath property. ```C# conflictResolutionPolicy.ConflictResolutionPath = "/name/first"; ``` -------------------------------- ### Create ChangeFeedStartFrom with Time Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.changefeedstartfrom.time Initializes a starting point for the change feed operation from a specified UTC date and time. ```csharp public static Microsoft.Azure.Cosmos.ChangeFeedStartFrom Time(DateTime dateTimeUtc); ``` ```fsharp static member Time : DateTime -> Microsoft.Azure.Cosmos.ChangeFeedStartFrom ``` ```vb Public Shared Function Time (dateTimeUtc As DateTime) As ChangeFeedStartFrom ``` -------------------------------- ### Create ChangeFeedStartFrom with Time and FeedRange Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.changefeedstartfrom.time Initializes a starting point for the change feed operation from a specified UTC date and time within a specific feed range. ```csharp public static Microsoft.Azure.Cosmos.ChangeFeedStartFrom Time(DateTime dateTimeUtc, Microsoft.Azure.Cosmos.FeedRange feedRange); ``` ```fsharp static member Time : DateTime * Microsoft.Azure.Cosmos.FeedRange -> Microsoft.Azure.Cosmos.ChangeFeedStartFrom ``` ```vb Public Shared Function Time (dateTimeUtc As DateTime, feedRange As FeedRange) As ChangeFeedStartFrom ``` -------------------------------- ### ChangeFeedStartFrom.Time(DateTime) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.changefeedstartfrom.time Creates a ChangeFeedStartFrom instance to start reading changes from a specific point in time. ```APIDOC ## ChangeFeedStartFrom.Time(DateTime) ### Description Creates a ChangeFeedStartFrom that tells the ChangeFeed operation to start reading changes from some point in time onward. ### Signature `public static Microsoft.Azure.Cosmos.ChangeFeedStartFrom Time(DateTime dateTimeUtc);` ### Parameters - **dateTimeUtc** (DateTime) - The time (in UTC) to start reading from. ### Returns - **ChangeFeedStartFrom** - A configuration object for the ChangeFeed operation. ``` -------------------------------- ### Upsert a Stream containing the item to Cosmos Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.container.upsertitemstreamasync Example demonstrating how to perform an upsert operation using a stream and process the resulting ResponseMessage. ```C# using(ResponseMessage response = await this.container.UpsertItemStreamAsync(stream, new PartitionKey("itemPartitionKey"))) { if (!response.IsSuccessStatusCode) { //Handle and log exception return; } //Read or do other operations with the stream using (StreamReader streamReader = new StreamReader(response.Content)) { string content = await streamReader.ReadToEndAsync(); } } ``` -------------------------------- ### ChangeFeedStartFrom.Time(DateTime, FeedRange) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.changefeedstartfrom.time Creates a ChangeFeedStartFrom instance to start reading changes from a specific point in time within a defined feed range. ```APIDOC ## ChangeFeedStartFrom.Time(DateTime, FeedRange) ### Description Creates a ChangeFeedStartFrom that tells the ChangeFeed operation to start reading changes from some point in time onward for a specific feed range. ### Signature `public static Microsoft.Azure.Cosmos.ChangeFeedStartFrom Time(DateTime dateTimeUtc, Microsoft.Azure.Cosmos.FeedRange feedRange);` ### Parameters - **dateTimeUtc** (DateTime) - The time to start reading from. - **feedRange** (FeedRange) - The range to start from. ### Returns - **ChangeFeedStartFrom** - A configuration object for the ChangeFeed operation. ``` -------------------------------- ### Read Permission Properties Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.permission.readasync Example of reading permission properties with a custom token expiry duration. ```csharp User user = this.database.GetUser("userId"); Permission permission= user.GetPermission("permissionId"); PermissionProperties permissionProperties = await permission.ReadAsync(tokenExpiryInSeconds: 9000); ``` -------------------------------- ### Read Current Item State Example Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.conflicts.readcurrentasync Iterates through conflicts and retrieves the current state of the item associated with each conflict. ```C# using (FeedIterator conflictIterator = conflicts.GetConflictQueryIterator()) { while (conflictIterator.HasMoreResults) { foreach(ConflictProperties item in await conflictIterator.ReadNextAsync()) { MyClass intendedChanges = conflicts.ReadConflictContent(item); ItemResponse currentState = await conflicts.ReadCurrentAsync(item, intendedChanges.MyPartitionKey); } } } ``` -------------------------------- ### Replace an Existing Trigger Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.scripts.scripts.replacetriggerstreamasync Example demonstrating how to define TriggerProperties and invoke the ReplaceTriggerStreamAsync method to update a trigger. ```C# TriggerProperties triggerProperties = new TriggerProperties { Id = "testTriggerId", Body = @"function AddTax() { var item = getContext().getRequest().getBody(); // Validate/calculate the tax. item.tax = item.cost* .15; // Update the request -- this is what is going to be inserted. getContext().getRequest().setBody(item); }", TriggerOperation = TriggerOperation.All, TriggerType = TriggerType.Post }; Scripts scripts = this.container.Scripts; ResponseMessage response = await scripts.ReplaceTriggerStreamAsync(triggerSettigs); if (!response.IsSuccessStatusCode) { //Handle and log exception return; } ``` -------------------------------- ### Get FeedIterator from LINQ Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.linq.cosmoslinqextensions.tostreamiterator Example demonstrating how to obtain a FeedIterator from an IOrderedQueryable to execute a filtered query. ```csharp IOrderedQueryable linqQueryable = this.Container.GetItemLinqQueryable(); using (FeedIterator setIterator = linqQueryable.Where(item => (item.taskNum < 100)).ToStreamIterator()) ``` -------------------------------- ### ServerSidePartitionedMetrics.RequestCharge Property Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serversidepartitionedmetrics.requestcharge Gets the request charge for the operation on this partition. ```APIDOC ## Property: RequestCharge ### Description Gets the request charge for the operation on this partition. ### Definition `public abstract double RequestCharge { get; }` ### Property Value - **Type**: Double ### Applies to - **Product**: Azure SDK for .NET - **Versions**: Latest, Preview ``` -------------------------------- ### SetUpdateOperation(String, TValue) Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.setupdateoperation-1.-ctor Initializes a new instance of the SetUpdateOperation class with the specified field and value. ```APIDOC ## SetUpdateOperation(String, TValue) Constructor ### Description Initializes a new instance of the SetUpdateOperation class with the specified field name and value to be updated. ### Signature `public SetUpdateOperation(string field, TValue value);` ### Parameters - **field** (String) - The name of the field to update. - **value** (TValue) - The value to set for the specified field. ``` -------------------------------- ### SetUpdateOperation Constructor Definitions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.setupdateoperation-1.-ctor Constructor signatures for initializing a SetUpdateOperation in C#, F#, and VB.NET. ```csharp public SetUpdateOperation(string field, TValue value); ``` ```fsharp new Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.SetUpdateOperation<'Value> : string * 'Value -> Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.SetUpdateOperation<'Value> ``` ```vb Public Sub New (field As String, value As TValue) ``` -------------------------------- ### Float128HybridRowSerializer.Comparer Property Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.float128hybridrowserializer.comparer Gets the IEqualityComparer used for comparing Float128 instances. ```APIDOC ## Property: Comparer ### Description Gets the IEqualityComparer used to compare Float128 values within the HybridRow serialization context. ### Signature `public System.Collections.Generic.IEqualityComparer Comparer { get; }` ### Property Value - **Type**: IEqualityComparer - **Description**: An equality comparer for the Float128 type. ``` -------------------------------- ### Initialize CosmosLinqSerializerOptions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmoslinqserializeroptions.-ctor Creates a new instance of the serialization options using default settings. ```csharp public CosmosLinqSerializerOptions(); ``` ```vb Public Sub New () ``` -------------------------------- ### Initialize CosmosSerializationOptions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosserializationoptions.-ctor Creates a new instance of the CosmosSerializationOptions class using default configuration settings. ```csharp public CosmosSerializationOptions(); ``` ```vb Public Sub New () ``` -------------------------------- ### UserDefinedFunctionResponse.ActivityId Property Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.scripts.userdefinedfunctionresponse.activityid Gets the activity ID for the request from the Azure Cosmos DB service. ```APIDOC ## Property: ActivityId ### Description Gets the activity ID for the request from the Azure Cosmos DB service. ### Property Value - **Type**: String - **Description**: The activity ID for the request. ### Syntax ```csharp public override string ActivityId { get; } ``` ``` -------------------------------- ### Initialize CosmosClientTelemetryOptions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosclienttelemetryoptions.-ctor Constructor for creating a new instance of the telemetry options class. ```csharp public CosmosClientTelemetryOptions(); ``` ```vb Public Sub New () ``` -------------------------------- ### Access the Comparer property Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.guidhybridrowserializer.comparer Retrieves the equality comparer used for Guid types in the serializer. ```csharp public System.Collections.Generic.IEqualityComparer Comparer { get; } ``` ```fsharp member this.Comparer : System.Collections.Generic.IEqualityComparer ``` ```vb Public ReadOnly Property Comparer As IEqualityComparer(Of Guid) ``` -------------------------------- ### Initialize EncryptionKeyWrapMetadata with parameters Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.encryptionkeywrapmetadata.-ctor Creates a new instance of key wrap metadata using specific identifiers and algorithm details. ```csharp public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); ``` ```fsharp new Microsoft.Azure.Cosmos.EncryptionKeyWrapMetadata : string * string * string * string -> Microsoft.Azure.Cosmos.EncryptionKeyWrapMetadata ``` ```vb Public Sub New (type As String, name As String, value As String, algorithm As String) ``` -------------------------------- ### Initialize CosmosDbClientMetrics Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosdbclientmetrics.-ctor Constructs a new instance of the CosmosDbClientMetrics class. ```C# public CosmosDbClientMetrics(); ``` ```VB Public Sub New () ``` -------------------------------- ### FeedResponse.RequestCharge Property Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.feedresponse-1.requestcharge Gets the request charge for this request from the Azure Cosmos DB service. ```APIDOC ## FeedResponse.RequestCharge Property ### Description Gets the request charge for this request from the Azure Cosmos DB service, measured in request units. ### Property Definition `public override double RequestCharge { get; }` ### Property Value - **Type**: Double - **Description**: The request charge measured in request units. ``` -------------------------------- ### Initialize RequestOptions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.requestoptions.-ctor Constructs a new instance of the RequestOptions class. ```C# public RequestOptions(); ``` ```VB Public Sub New () ``` -------------------------------- ### ClientEncryptionKeyResponse.StatusCode Property Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.clientencryptionkeyresponse.statuscode Gets the request completion status code from the Azure Cosmos DB service. ```APIDOC ## Property: StatusCode ### Description Gets the request completion status code from the Azure Cosmos DB service. This can be used to determine the outcome of a request, such as whether a resource was created or already existed. ### Definition `public override System.Net.HttpStatusCode StatusCode { get; }` ### Property Value - **HttpStatusCode** - The request completion status code returned by the service. ``` -------------------------------- ### PartitionKey(String) Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.partitionkey.-ctor Creates a new partition key value using a string input. ```csharp public PartitionKey(string partitionKeyValue); ``` ```fsharp new Microsoft.Azure.Cosmos.PartitionKey : string -> Microsoft.Azure.Cosmos.PartitionKey ``` ```vb Public Sub New (partitionKeyValue As String) ``` -------------------------------- ### Initialize EncryptionKeyWrapMetadata from existing instance Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.encryptionkeywrapmetadata.-ctor Creates a new instance of key wrap metadata by copying an existing instance. ```csharp public EncryptionKeyWrapMetadata(Microsoft.Azure.Cosmos.EncryptionKeyWrapMetadata source); ``` ```fsharp new Microsoft.Azure.Cosmos.EncryptionKeyWrapMetadata : Microsoft.Azure.Cosmos.EncryptionKeyWrapMetadata -> Microsoft.Azure.Cosmos.EncryptionKeyWrapMetadata ``` ```vb Public Sub New (source As EncryptionKeyWrapMetadata) ``` -------------------------------- ### TryGetValue(ReadOnlySpan key, out TValue value) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.core.collections.trie-2.trygetvalue Attempts to get the value associated with the specified key in the Trie. ```APIDOC ## public bool TryGetValue(ReadOnlySpan key, out TValue value) ### Description Attempts to retrieve the value associated with the specified key from the Trie. Returns true if the key is found; otherwise, false. ### Parameters - **key** (ReadOnlySpan) - The key to locate. - **value** (TValue) - When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. ### Returns - **Boolean** - true if the Trie contains an element with the specified key; otherwise, false. ``` -------------------------------- ### ContainerRequestOptions() Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.containerrequestoptions.-ctor Initializes a new instance of the ContainerRequestOptions class. ```APIDOC ## ContainerRequestOptions() ### Description Initializes a new instance of the ContainerRequestOptions class. ### Signature `public ContainerRequestOptions();` ``` -------------------------------- ### Initialize SchemaOptionsComparer Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.schemaoptionshybridrowserializer.schemaoptionscomparer.-ctor Initializes a new instance of the SchemaOptionsComparer class. ```csharp public SchemaOptionsComparer(); ``` ```vb Public Sub New () ``` -------------------------------- ### InvokeUserDefinedFunction Usage Example Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.linq.cosmoslinq.invokeuserdefinedfunction Demonstrates using the method within a LINQ query to filter items based on a UDF result. ```csharp // Equivalent to SELECT * FROM books b WHERE udf.toLowerCase(b.title) = 'war and peace'" IQueryable queryable = client .GetContainer("database", "container") .GetItemLinqQueryable() .Where(b => CosmosLinq.InvokeUserDefinedFunction("toLowerCase", b.Title) == "war and peace"); FeedIterator bookIterator = queryable.ToFeedIterator(); while (feedIterator.HasMoreResults) { FeedResponse responseMessage = await feedIterator.ReadNextAsync(); DoSomethingWithResponse(responseMessage); } ``` -------------------------------- ### Drain query results using HasMoreResults Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.feediterator-1.hasmoreresults Example demonstrating how to iterate through all query results by checking the HasMoreResults property in a while loop. ```C# QueryDefinition queryDefinition = new QueryDefinition("select c.id From c where c.status = @status") .WithParameter("@status", "Failure"); using (FeedIterator feedIterator = this.Container.GetItemQueryIterator( queryDefinition)) { while (feedIterator.HasMoreResults) { FeedResponse response = await feedIterator.ReadNextAsync(); foreach (var item in response) { Console.WriteLine(item); } } } ``` -------------------------------- ### CosmosClientTelemetryOptions() Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosclienttelemetryoptions.-ctor Initializes a new instance of the CosmosClientTelemetryOptions class. ```APIDOC ## public CosmosClientTelemetryOptions() ### Description Initializes a new instance of the CosmosClientTelemetryOptions class. ### Syntax `public CosmosClientTelemetryOptions();` ``` -------------------------------- ### CosmosDbClientMetrics() Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosdbclientmetrics.-ctor Initializes a new instance of the CosmosDbClientMetrics class. ```APIDOC ## CosmosDbClientMetrics() ### Description Initializes a new instance of the CosmosDbClientMetrics class. ### Signature `public CosmosDbClientMetrics();` ### Namespace Microsoft.Azure.Cosmos ### Assembly Microsoft.Azure.Cosmos.Client.dll ``` -------------------------------- ### Initialize IncludedPath Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.includedpath.-ctor Constructor for creating a new instance of the IncludedPath class. ```C# public IncludedPath(); ``` ```VB Public Sub New () ``` -------------------------------- ### ChangeFeedEstimatorRequestOptions.MaxItemCount Property Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.changefeedestimatorrequestoptions.maxitemcount Gets or sets the maximum number of estimations to return per page. If this value is greater than the number of leases, all estimations will be returned in the first page. ```APIDOC ## Property: MaxItemCount ### Description Gets or sets the maximum number of estimations to return per page. ### Type Nullable ### Remarks If this value is greater than the number of leases, all estimations will be returned in the first page. ### C# Definition ```csharp public int? MaxItemCount { get; set; } ``` ``` -------------------------------- ### Initialize ContainerRequestOptions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.containerrequestoptions.-ctor Initializes a new instance of the ContainerRequestOptions class. ```csharp public ContainerRequestOptions(); ``` ```vb Public Sub New () ``` -------------------------------- ### Define WithThroughputBucket method Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.fluent.cosmosclientbuilder.withthroughputbucket Method signature for configuring the throughput bucket in the CosmosClientBuilder. ```csharp public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithThroughputBucket(int throughputBucket); ``` ```fsharp member this.WithThroughputBucket : int -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder ``` ```vb Public Function WithThroughputBucket (throughputBucket As Integer) As CosmosClientBuilder ``` -------------------------------- ### CosmosLinqSerializerOptions() Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmoslinqserializeroptions.-ctor Initializes a new instance of the CosmosLinqSerializerOptions class with default values. ```APIDOC ## CosmosLinqSerializerOptions() ### Description Creates an instance of CosmosLinqSerializerOptions with the default values for the Cosmos SDK. ### Signature `public CosmosLinqSerializerOptions();` ``` -------------------------------- ### MaxIntegratedCacheStaleness Property Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.dedicatedgatewayrequestoptions.maxintegratedcachestaleness Gets or sets the staleness value associated with the request in the Azure Cosmos DB service. This property is used to ensure that responses from the integrated cache are no staler than the specified duration. ```APIDOC ## Property: MaxIntegratedCacheStaleness ### Description Gets or sets the staleness value associated with the request in the Azure Cosmos DB service. For requests with Eventual or Session consistency, this ensures responses from the integrated cache are no staler than the specified value. ### Signature `public TimeSpan? MaxIntegratedCacheStaleness { get; set; }` ### Property Value - **Type**: Nullable - **Default**: null ### Remarks Cache staleness is supported with millisecond granularity. Any value smaller than milliseconds will be ignored. ``` -------------------------------- ### CosmosClientOptions.EnableContentResponseOnWrite Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions.enablecontentresponseonwrite Gets or sets a boolean value that determines if the resource is returned in the response for write operations (Create, Upsert, Patch, Replace). Setting this to false returns only headers and status codes, which can improve performance. ```APIDOC ## Property: EnableContentResponseOnWrite ### Description Gets or sets a boolean value that determines if the resource is returned in the response for write operations (Create, Upsert, Patch, Replace). Setting this to false returns only headers and status codes, which can improve performance by reducing network and CPU load. ### Signature `public bool? EnableContentResponseOnWrite { get; set; }` ### Property Value - **Type**: Nullable ### Remarks - This is optimal for workloads where the returned resource is not used. - This option can be overridden by the similar property in `ItemRequestOptions` and `TransactionalBatchItemRequestOptions`. ``` -------------------------------- ### CosmosSerializationOptions() Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosserializationoptions.-ctor Initializes a new instance of the CosmosSerializationOptions class with default values. ```APIDOC ## CosmosSerializationOptions() ### Description Creates an instance of CosmosSerializationOptions with the default values for the Cosmos SDK. ### Syntax `public CosmosSerializationOptions();` ``` -------------------------------- ### PartitionKey(Boolean) Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.partitionkey.-ctor Creates a new partition key value using a boolean input. ```csharp public PartitionKey(bool partitionKeyValue); ``` ```fsharp new Microsoft.Azure.Cosmos.PartitionKey : bool -> Microsoft.Azure.Cosmos.PartitionKey ``` ```vb Public Sub New (partitionKeyValue As Boolean) ``` -------------------------------- ### PartitionKey(Double) Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.partitionkey.-ctor Creates a new partition key value using a double input. ```csharp public PartitionKey(double partitionKeyValue); ``` ```fsharp new Microsoft.Azure.Cosmos.PartitionKey : double -> Microsoft.Azure.Cosmos.PartitionKey ``` ```vb Public Sub New (partitionKeyValue As Double) ``` -------------------------------- ### PushUpdateOperation(String, Object[]) Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.pushupdateoperation.-ctor Initializes a new instance of the PushUpdateOperation class with the specified field and values. ```csharp public PushUpdateOperation(string field, object[] value); ``` ```fsharp new Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.PushUpdateOperation : string * obj[] -> Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.PushUpdateOperation ``` ```vb Public Sub New (field As String, value As Object()) ``` -------------------------------- ### InitializeAsync() Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.ibulkexecutor Initializes the bulk executor instance. ```APIDOC ## InitializeAsync() ### Description Initializes the bulk executor instance. ### Signature Task InitializeAsync() ``` -------------------------------- ### Record(Int32, UInt32) Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.recordio.record.-ctor Initializes a new instance of the Record class with the specified length and CRC32 value. ```APIDOC ## Record(Int32, UInt32) Constructor ### Description Initializes a new instance of the Record class using the provided length and CRC32 checksum. ### Signature `public Record(int length, uint crc32);` ### Parameters - **length** (Int32) - The length of the record. - **crc32** (UInt32) - The CRC32 checksum value. ``` -------------------------------- ### Initialize ReadManyRequestOptions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.readmanyrequestoptions.-ctor Constructs a new instance of the ReadManyRequestOptions class. ```csharp public ReadManyRequestOptions(); ``` ```vb Public Sub New () ``` -------------------------------- ### Initialize TransactionalBatchRequestOptions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.transactionalbatchrequestoptions.-ctor Constructs a new instance of the request options for transactional batch operations. ```csharp public TransactionalBatchRequestOptions(); ``` ```vb Public Sub New () ``` -------------------------------- ### Initialize BulkExecutor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkexecutor.-ctor Constructs a new instance of the BulkExecutor class using the provided DocumentClient and DocumentCollection. ```csharp public BulkExecutor(Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.DocumentCollection documentCollection); ``` ```fsharp new Microsoft.Azure.CosmosDB.BulkExecutor.BulkExecutor : Microsoft.Azure.Documents.Client.DocumentClient * Microsoft.Azure.Documents.DocumentCollection -> Microsoft.Azure.CosmosDB.BulkExecutor.BulkExecutor ``` ```vb Public Sub New (client As DocumentClient, documentCollection As DocumentCollection) ``` -------------------------------- ### Initialize LayoutCompilationException Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.layouts.layoutcompilationexception.-ctor Initializes a new instance of the LayoutCompilationException class. ```csharp public LayoutCompilationException(); ``` ```vb Public Sub New () ``` -------------------------------- ### Initialize CosmosDiagnostics Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosdiagnostics.-ctor The protected constructor for the CosmosDiagnostics class. ```csharp protected CosmosDiagnostics(); ``` ```vb Protected Sub New () ``` -------------------------------- ### Method Signatures for WithParameterStream Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.querydefinition.withparameterstream The method signatures for C#, F#, and VB.NET. ```C# public Microsoft.Azure.Cosmos.QueryDefinition WithParameterStream(string name, System.IO.Stream valueStream); ``` ```F# member this.WithParameterStream : string * System.IO.Stream -> Microsoft.Azure.Cosmos.QueryDefinition ``` ```VB Public Function WithParameterStream (name As String, valueStream As Stream) As QueryDefinition ``` -------------------------------- ### PushUpdateOperation(String, Object[]) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.pushupdateoperation.-ctor Initializes a new instance of the PushUpdateOperation class with the specified field and values. ```APIDOC ## PushUpdateOperation(string field, object[] value) ### Description Initializes a new instance of the PushUpdateOperation class. ### Parameters - **field** (String) - The field name to update. - **value** (Object[]) - The array of values to push to the field. ``` -------------------------------- ### Initialize BulkUpdateResponse Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.bulkupdateresponse.-ctor Constructs a new instance of the BulkUpdateResponse class. ```csharp public BulkUpdateResponse(); ``` ```vb Public Sub New () ``` -------------------------------- ### TransactionalBatchRequestOptions Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.transactionalbatchrequestoptions.-ctor Initializes a new instance of the TransactionalBatchRequestOptions class. ```APIDOC ## TransactionalBatchRequestOptions() ### Description Initializes a new instance of the TransactionalBatchRequestOptions class. ### Signature `public TransactionalBatchRequestOptions();` ``` -------------------------------- ### TryFindString Method Signatures Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.layouts.stringtokenizer.tryfindstring Method signatures for retrieving a string from a token across different .NET languages. ```csharp public bool TryFindString(ulong token, out Microsoft.Azure.Cosmos.Core.Utf8.Utf8String path); ``` ```fsharp member this.TryFindString : uint64 * Utf8String -> bool ``` ```vb Public Function TryFindString (token As ULong, ByRef path As Utf8String) As Boolean ``` -------------------------------- ### Initialize PatchItemRequestOptions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.patchitemrequestoptions.-ctor Initializes a new instance of the PatchItemRequestOptions class. ```csharp public PatchItemRequestOptions(); ``` ```vb Public Sub New () ``` -------------------------------- ### Initialize LinearRing instance Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.spatial.linearring.-ctor Constructs a new LinearRing object using a list of positions. Requires at least 4 positions where the first and last points are equivalent. ```C# public LinearRing(System.Collections.Generic.IList coordinates); ``` ```F# new Microsoft.Azure.Cosmos.Spatial.LinearRing : System.Collections.Generic.IList -> Microsoft.Azure.Cosmos.Spatial.LinearRing ``` ```VB Public Sub New (coordinates As IList(Of Position)) ``` -------------------------------- ### ReadManyRequestOptions Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.readmanyrequestoptions.-ctor Initializes a new instance of the ReadManyRequestOptions class. ```APIDOC ## ReadManyRequestOptions() ### Description Initializes a new instance of the ReadManyRequestOptions class. ### Signature `public ReadManyRequestOptions();` ``` -------------------------------- ### BulkExecutor(DocumentClient, DocumentCollection) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkexecutor.-ctor Initializes a new instance of the BulkExecutor class using the provided DocumentClient and DocumentCollection. ```APIDOC ## BulkExecutor(DocumentClient, DocumentCollection) Constructor ### Description Initializes a new instance of the BulkExecutor class for performing bulk operations against a specific Azure Cosmos DB collection. ### Signature `public BulkExecutor(Microsoft.Azure.Documents.Client.DocumentClient client, Microsoft.Azure.Documents.DocumentCollection documentCollection);` ### Parameters - **client** (DocumentClient) - The DocumentClient instance used to communicate with the Cosmos DB service. - **documentCollection** (DocumentCollection) - The target DocumentCollection for bulk operations. ``` -------------------------------- ### PushUpdateOperation(String, Object[], List) Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.pushupdateoperation.-ctor Initializes a new instance of the PushUpdateOperation class with the specified field, values, and update modifiers. ```csharp public PushUpdateOperation(string field, object[] value, System.Collections.Generic.List modifiers); ``` ```fsharp new Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.PushUpdateOperation : string * obj[] * System.Collections.Generic.List -> Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.PushUpdateOperation ``` ```vb Public Sub New (field As String, value As Object(), modifiers As List(Of UpdateModifier)) ``` -------------------------------- ### Initialize BigEndianBinaryWriter Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.core.bigendianbinarywriter.-ctor Constructs a new BigEndianBinaryWriter instance using a stream, encoding, and a boolean to control stream closure. ```C# public BigEndianBinaryWriter(System.IO.Stream output, System.Text.Encoding encoding, bool leaveOpen); ``` ```F# new Microsoft.Azure.Cosmos.Core.BigEndianBinaryWriter : System.IO.Stream * System.Text.Encoding * bool -> Microsoft.Azure.Cosmos.Core.BigEndianBinaryWriter ``` ```VB Public Sub New (output As Stream, encoding As Encoding, leaveOpen As Boolean) ``` -------------------------------- ### WriteSparse Method Signatures Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.layouts.layoutuint64.writesparse Method definitions for writing sparse UInt64 values across different .NET languages. ```csharp public override Microsoft.Azure.Cosmos.Serialization.HybridRow.Result WriteSparse(ref Microsoft.Azure.Cosmos.Serialization.HybridRow.RowBuffer b, ref Microsoft.Azure.Cosmos.Serialization.HybridRow.RowCursor edit, ulong value, Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.UpdateOptions options = Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.UpdateOptions.Upsert); ``` ```fsharp override this.WriteSparse : RowBuffer * RowCursor * uint64 * Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.UpdateOptions -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Result ``` ```vb Public Overrides Function WriteSparse (ByRef b As RowBuffer, ByRef edit As RowCursor, value As ULong, Optional options As UpdateOptions = Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.UpdateOptions.Upsert) As Result ``` -------------------------------- ### UpdateItem(String, String, IEnumerable) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.updateitem.-ctor Initializes a new instance of the UpdateItem class with the specified ID, partition key, and update operations. ```APIDOC ## UpdateItem(string id, string partitionKey, IEnumerable updateOperations) ### Description Initializes a new instance of the UpdateItem class, which represents an update operation to be performed in bulk on a Cosmos DB item. ### Parameters - **id** (String) - The unique identifier of the item to update. - **partitionKey** (String) - The partition key of the item to update. - **updateOperations** (IEnumerable) - A collection of update operations to apply to the item. ``` -------------------------------- ### IncludedPath Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.includedpath.-ctor Initializes a new instance of the IncludedPath class. ```APIDOC ## IncludedPath Constructor ### Description Initializes a new instance of the IncludedPath class. ### Signature `public IncludedPath();` ``` -------------------------------- ### SchemaException Constructor with Message Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.schemaexception.-ctor Initializes a new instance of the SchemaException class with a specified error message. ```csharp public SchemaException(string message); ``` ```fsharp new Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.SchemaException : string -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.SchemaException ``` ```vb Public Sub New (message As String) ``` -------------------------------- ### WithTimeToLivePropertyPath Method Signatures Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.fluent.containerdefinition-1.withtimetolivepropertypath Method signatures for defining the TTL property path across C#, F#, and VB.NET. ```csharp public T WithTimeToLivePropertyPath(string propertyPath); ``` ```fsharp member this.WithTimeToLivePropertyPath : string -> 'T ``` ```vb Public Function WithTimeToLivePropertyPath (propertyPath As String) As T ``` -------------------------------- ### SchemaException Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.schemaexception.-ctor Initializes a new instance of the SchemaException class. ```csharp public SchemaException(); ``` ```vb Public Sub New () ``` -------------------------------- ### TryDequeue Method Signatures Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.core.asyncqueue-1.trydequeue Method signatures for TryDequeue across different .NET languages. ```csharp public bool TryDequeue(out T item); ``` ```fsharp member this.TryDequeue : 'T -> bool ``` ```vb Public Function TryDequeue (ByRef item As T) As Boolean ``` -------------------------------- ### Initialize ExcludedPath Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.excludedpath.-ctor Constructor for creating a new instance of the ExcludedPath class. ```csharp public ExcludedPath(); ``` ```vb Public Sub New () ``` -------------------------------- ### Initialize UniqueKey Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.uniquekey.-ctor Constructor for creating a new instance of the UniqueKey class. ```csharp public UniqueKey(); ``` ```vb Public Sub New () ``` -------------------------------- ### CosmosOperationCanceledException(SerializationInfo, StreamingContext) Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosoperationcanceledexception.-ctor Initializes a new instance of the exception for serialization purposes using the provided SerializationInfo and StreamingContext. ```C# protected CosmosOperationCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); ``` ```F# new Microsoft.Azure.Cosmos.CosmosOperationCanceledException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.Azure.Cosmos.CosmosOperationCanceledException ``` ```VB Protected Sub New (info As SerializationInfo, context As StreamingContext) ``` -------------------------------- ### Initialize Polygon with LinearRings and GeometryParams Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.spatial.polygon.-ctor Initializes a new instance of the Polygon class using a list of LinearRings and additional geometry parameters. ```C# public Polygon(System.Collections.Generic.IList rings, Microsoft.Azure.Cosmos.Spatial.GeometryParams geometryParams); ``` ```F# new Microsoft.Azure.Cosmos.Spatial.Polygon : System.Collections.Generic.IList * Microsoft.Azure.Cosmos.Spatial.GeometryParams -> Microsoft.Azure.Cosmos.Spatial.Polygon ``` ```VB Public Sub New (rings As IList(Of LinearRing), geometryParams As GeometryParams) ``` -------------------------------- ### UniqueKey Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.uniquekey.-ctor Initializes a new instance of the UniqueKey class. ```APIDOC ## UniqueKey Constructor ### Definition - **Namespace**: Microsoft.Azure.Cosmos - **Assembly**: Microsoft.Azure.Cosmos.Client.dll ### Syntax ```csharp public UniqueKey(); ``` ### Description Initializes a new instance of the UniqueKey class. ``` -------------------------------- ### LayoutPropertyScope Constructor Definitions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.layouts.layoutpropertyscope.-ctor Constructor signatures for initializing a LayoutPropertyScope instance across C#, F#, and VB.NET. ```csharp protected LayoutPropertyScope(Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.LayoutCode code, bool immutable); ``` ```fsharp new Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.LayoutPropertyScope : Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.LayoutCode * bool -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.LayoutPropertyScope ``` ```vb Protected Sub New (code As LayoutCode, immutable As Boolean) ``` -------------------------------- ### PatchItemRequestOptions Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.patchitemrequestoptions.-ctor Initializes a new instance of the PatchItemRequestOptions class. ```APIDOC ## PatchItemRequestOptions() ### Description Initializes a new instance of the PatchItemRequestOptions class. ### Signature `public PatchItemRequestOptions();` ``` -------------------------------- ### BigEndianBinaryWriter(Stream, Encoding, Boolean) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.core.bigendianbinarywriter.-ctor Initializes a new instance of the BigEndianBinaryWriter class with the specified stream, encoding, and leaveOpen flag. ```APIDOC ## BigEndianBinaryWriter(System.IO.Stream, System.Text.Encoding, bool) ### Description Initializes a new instance of the BigEndianBinaryWriter class using the specified stream, character encoding, and a value indicating whether to leave the stream open. ### Signature `public BigEndianBinaryWriter(System.IO.Stream output, System.Text.Encoding encoding, bool leaveOpen);` ### Parameters - **output** (System.IO.Stream) - The output stream. - **encoding** (System.Text.Encoding) - The character encoding to use. - **leaveOpen** (bool) - true to leave the stream open after the BigEndianBinaryWriter object is disposed; otherwise, false. ``` -------------------------------- ### public Embedding() Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.embedding.-ctor Initializes a new instance of the Embedding class. ```APIDOC ## Embedding Constructor ### Description Initializes a new instance of the Embedding class. ### Signature `public Embedding();` ``` -------------------------------- ### Initialize UdtPropertyTypeComparer Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.udtpropertytypehybridrowserializer.udtpropertytypecomparer.-ctor Constructor for creating a new instance of the UdtPropertyTypeComparer class. ```csharp public UdtPropertyTypeComparer(); ``` ```vb Public Sub New () ``` -------------------------------- ### LayoutResolverSimple Constructor Definition Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.layouts.layoutresolversimple.-ctor Constructor signatures for initializing LayoutResolverSimple across different .NET languages. ```csharp public LayoutResolverSimple(Func resolver); ``` ```fsharp new Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.LayoutResolverSimple : Func -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.LayoutResolverSimple ``` ```vb Public Sub New (resolver As Func(Of SchemaId, Layout)) ``` -------------------------------- ### WithVectorIndexShardKey Method Signatures Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.fluent.vectorindexdefinition-1.withvectorindexshardkey Method signatures for configuring the vector index shard key across supported .NET languages. ```csharp public Microsoft.Azure.Cosmos.Fluent.VectorIndexDefinition WithVectorIndexShardKey(string[] vectorIndexShardKey); ``` ```fsharp member this.WithVectorIndexShardKey : string[] -> Microsoft.Azure.Cosmos.Fluent.VectorIndexDefinition<'T> ``` ```vb Public Function WithVectorIndexShardKey (vectorIndexShardKey As String()) As VectorIndexDefinition(Of T) ``` -------------------------------- ### Write Method Signatures Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.primarysortkeyhybridrowserializer.write Method signatures for writing a PrimarySortKey in C#, F#, and VB.NET. ```csharp public Microsoft.Azure.Cosmos.Serialization.HybridRow.Result Write(ref Microsoft.Azure.Cosmos.Serialization.HybridRow.RowBuffer row, ref Microsoft.Azure.Cosmos.Serialization.HybridRow.RowCursor scope, bool isRoot, Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.TypeArgumentList typeArgs, Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.PrimarySortKey value); ``` ```fsharp abstract member Write : RowBuffer * RowCursor * bool * Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.TypeArgumentList * Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.PrimarySortKey -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Result override this.Write : RowBuffer * RowCursor * bool * Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.TypeArgumentList * Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.PrimarySortKey -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Result ``` ```vb Public Function Write (ByRef row As RowBuffer, ByRef scope As RowCursor, isRoot As Boolean, typeArgs As TypeArgumentList, value As PrimarySortKey) As Result ``` -------------------------------- ### UniqueKeyPolicy Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.uniquekeypolicy.-ctor Initializes a new instance of the UniqueKeyPolicy class. ```APIDOC ## UniqueKeyPolicy() ### Description Initializes a new instance of the UniqueKeyPolicy class. ### Signature `public UniqueKeyPolicy();` ``` -------------------------------- ### Initialize LayoutCompilationException with Message Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.layouts.layoutcompilationexception.-ctor Initializes a new instance of the LayoutCompilationException class with a specified error message. ```csharp public LayoutCompilationException(string message); ``` ```fsharp new Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.LayoutCompilationException : string -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.LayoutCompilationException ``` ```vb Public Sub New (message As String) ``` -------------------------------- ### Write Method Definitions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.objectpropertytypehybridrowserializer.write Method signatures for writing an ObjectPropertyType in C#, F#, and VB. ```csharp public Microsoft.Azure.Cosmos.Serialization.HybridRow.Result Write(ref Microsoft.Azure.Cosmos.Serialization.HybridRow.RowBuffer row, ref Microsoft.Azure.Cosmos.Serialization.HybridRow.RowCursor scope, bool isRoot, Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.TypeArgumentList typeArgs, Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.ObjectPropertyType value); ``` ```fsharp abstract member Write : RowBuffer * RowCursor * bool * Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.TypeArgumentList * Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.ObjectPropertyType -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Result override this.Write : RowBuffer * RowCursor * bool * Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.TypeArgumentList * Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.ObjectPropertyType -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Result ``` ```vb Public Function Write (ByRef row As RowBuffer, ByRef scope As RowCursor, isRoot As Boolean, typeArgs As TypeArgumentList, value As ObjectPropertyType) As Result ``` -------------------------------- ### Attach Method Definition Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.fluent.fulltextindexdefinition-1.attach Applies the current definition to the parent, returning the parent instance. ```csharp public T Attach(); ``` ```fsharp member this.Attach : unit -> 'T ``` ```vb Public Function Attach () As T ``` -------------------------------- ### Initialize Record instance Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.recordio.record.-ctor Constructs a new Record object using the specified length and CRC32 value. ```C# public Record(int length, uint crc32); ``` ```F# new Microsoft.Azure.Cosmos.Serialization.HybridRow.RecordIO.Record : int * uint32 -> Microsoft.Azure.Cosmos.Serialization.HybridRow.RecordIO.Record ``` ```VB Public Sub New (length As Integer, crc32 As UInteger) ``` -------------------------------- ### Database.ReadThroughputAsync(RequestOptions, CancellationToken) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.database.readthroughputasync Retrieves the database throughput in request units per second with additional request options. ```APIDOC ## Database.ReadThroughputAsync(RequestOptions, CancellationToken) ### Description Gets database throughput in measurement of request units per second in the Azure Cosmos service with support for request options. ### Parameters - **requestOptions** (RequestOptions) - Required - Options for the request. - **cancellationToken** (CancellationToken) - Optional - CancellationToken representing request cancellation. ### Returns - **Task>** - Provisioned throughput in request units per second. ``` -------------------------------- ### LayoutResolverSimple(Func) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.layouts.layoutresolversimple.-ctor Initializes a new instance of the LayoutResolverSimple class using a delegate function to resolve layouts. ```APIDOC ## LayoutResolverSimple(Func) ### Description Initializes a new instance of the LayoutResolverSimple class. This constructor accepts a delegate function that maps a SchemaId to a Layout. ### Signature `public LayoutResolverSimple(Func resolver)` ### Parameters - **resolver** (Func) - A function that takes a SchemaId and returns the corresponding Layout. ``` -------------------------------- ### ReadThroughputAsync Method Definitions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.database.readthroughputasync Method signatures for retrieving database throughput across C#, F#, and VB.NET. ```C# public abstract System.Threading.Tasks.Task ReadThroughputAsync(System.Threading.CancellationToken cancellationToken = default); ``` ```F# abstract member ReadThroughputAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task> ``` ```VB Public MustOverride Function ReadThroughputAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Nullable(Of Integer)) ``` -------------------------------- ### Initialize UniqueKeyPolicy Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.uniquekeypolicy.-ctor Constructs a new instance of the UniqueKeyPolicy class. ```C# public UniqueKeyPolicy(); ``` ```VB Public Sub New () ``` -------------------------------- ### SystemSchema.GetNamespace() Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.layouts.systemschema.getnamespace Retrieves the Namespace object for the SystemSchema. ```APIDOC ## SystemSchema.GetNamespace() ### Description Retrieves the Namespace associated with the SystemSchema. ### Signature `public static Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.Namespace GetNamespace();` ### Returns - **Namespace** - The namespace object associated with the system schema. ``` -------------------------------- ### Initialize Polygon with LinearRings Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.spatial.polygon.-ctor Initializes a new instance of the Polygon class using a list of LinearRings, where the first ring is the external boundary and subsequent rings define holes. ```C# public Polygon(System.Collections.Generic.IList rings); ``` ```F# new Microsoft.Azure.Cosmos.Spatial.Polygon : System.Collections.Generic.IList -> Microsoft.Azure.Cosmos.Spatial.Polygon ``` ```VB Public Sub New (rings As IList(Of LinearRing)) ``` -------------------------------- ### PartitionKey(String) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.partitionkey.-ctor Creates a new partition key value from a string. ```APIDOC ## PartitionKey(String) ### Description Creates a new partition key value using a string input. ### Parameters - **partitionKeyValue** (String) - Required - The value to use as partition key. ``` -------------------------------- ### MemorySpanResizer(Int32) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.memoryspanresizer-1.-ctor Initializes a new instance of the MemorySpanResizer class. ```APIDOC ## MemorySpanResizer(Int32) Constructor ### Description Initializes a new instance of the MemorySpanResizer class with an optional initial capacity. ### Signature `public MemorySpanResizer(int initialCapacity = 0);` ### Parameters - **initialCapacity** (Int32) - Optional - The initial capacity for the memory span resizer. Defaults to 0. ``` -------------------------------- ### PushUpdateOperation(String, Object[], List) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.pushupdateoperation.-ctor Initializes a new instance of the PushUpdateOperation class with the specified field, values, and update modifiers. ```APIDOC ## PushUpdateOperation(string field, object[] value, List modifiers) ### Description Initializes a new instance of the PushUpdateOperation class with additional update modifiers. ### Parameters - **field** (String) - The field name to update. - **value** (Object[]) - The array of values to push to the field. - **modifiers** (List) - A list of modifiers to apply to the update operation. ``` -------------------------------- ### UpdateItem Constructor Syntax Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.updateitem.-ctor Constructor definitions for initializing an UpdateItem in C#, F#, and VB.NET. ```csharp public UpdateItem(string id, string partitionKey, System.Collections.Generic.IEnumerable updateOperations); ``` ```fsharp new Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.UpdateItem : string * string * seq -> Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.UpdateItem ``` ```vb Public Sub New (id As String, partitionKey As String, updateOperations As IEnumerable(Of UpdateOperation)) ``` -------------------------------- ### Initialize TransactionalBatchOperationResult Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.transactionalbatchoperationresult.-ctor Constructor definition for the TransactionalBatchOperationResult class. ```csharp protected TransactionalBatchOperationResult(); ``` ```vb Protected Sub New () ``` -------------------------------- ### TypedTupleComparer Constructor Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.typedtuplehybridrowserializer-4.typedtuplecomparer.-ctor Initializes a new instance of the TypedTupleComparer class. ```APIDOC ## TypedTupleComparer() ### Description Initializes a new instance of the TypedTupleComparer class. ### Syntax `public TypedTupleComparer();` ``` -------------------------------- ### Initialize TypedTupleComparer Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.typedtuplehybridrowserializer-4.typedtuplecomparer.-ctor Constructor for creating a new instance of the TypedTupleComparer class. ```csharp public TypedTupleComparer(); ``` ```vb Public Sub New () ``` -------------------------------- ### Initialize StoredProcedureRequestOptions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.scripts.storedprocedurerequestoptions.-ctor Constructor for creating a new instance of StoredProcedureRequestOptions. ```csharp public StoredProcedureRequestOptions(); ``` ```vb Public Sub New () ``` -------------------------------- ### EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata) Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.encryptionkeywrapmetadata.-ctor Creates a new instance of key wrap metadata based on an existing instance. ```APIDOC ## EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata) ### Description Creates a new instance of key wrap metadata based on an existing instance. ### Parameters - **source** (EncryptionKeyWrapMetadata) - Required - Existing instance from which to initialize. ``` -------------------------------- ### GetHashCode Method Signatures Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.schemas.primarysortkeyhybridrowserializer.primarysortkeycomparer.gethashcode Method signatures for computing the hash code of a PrimarySortKey across different .NET languages. ```csharp public override int GetHashCode(Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.PrimarySortKey obj); ``` ```fsharp override this.GetHashCode : Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas.PrimarySortKey -> int ``` ```vb Public Overrides Function GetHashCode (obj As PrimarySortKey) As Integer ``` -------------------------------- ### StringToken Constructor Syntax Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.layouts.stringtoken.-ctor Syntax definitions for the StringToken constructor across C#, F#, and VB.NET. ```csharp public StringToken(ulong id, Microsoft.Azure.Cosmos.Core.Utf8.Utf8String path); ``` ```fsharp new Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.StringToken : uint64 * Microsoft.Azure.Cosmos.Core.Utf8.Utf8String -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.StringToken ``` ```vb Public Sub New (id As ULong, path As Utf8String) ``` -------------------------------- ### Initialize LayoutCompilationException with Message and Inner Exception Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.serialization.hybridrow.layouts.layoutcompilationexception.-ctor Initializes a new instance of the LayoutCompilationException class with a specified error message and a reference to the inner exception that is the cause of this exception. ```csharp public LayoutCompilationException(string message, Exception innerException); ``` ```fsharp new Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.LayoutCompilationException : string * Exception -> Microsoft.Azure.Cosmos.Serialization.HybridRow.Layouts.LayoutCompilationException ``` ```vb Public Sub New (message As String, innerException As Exception) ``` -------------------------------- ### UpdateOperation Constructor Definitions Source: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.updateoperation-1.-ctor Constructor signatures for initializing an UpdateOperation in C#, F#, and VB.NET. ```csharp public UpdateOperation(Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.UpdateOperationType type, string field, TValue value); ``` ```fsharp new Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.UpdateOperation<'Value> : Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.UpdateOperationType * string * 'Value -> Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.UpdateOperation<'Value> ``` ```vb Public Sub New (type As UpdateOperationType, field As String, value As TValue) ```