public override Task <ResponseMessage> ExecuteStoredProcedureStreamAsync( string storedProcedureId, Stream streamPayload, Cosmos.PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { if (string.IsNullOrEmpty(storedProcedureId)) { throw new ArgumentNullException(nameof(storedProcedureId)); } ContainerInternal.ValidatePartitionKey(partitionKey, requestOptions); Uri linkUri = this.clientContext.CreateLink( parentLink: this.container.LinkUri.OriginalString, uriPathSegment: Paths.StoredProceduresPathSegment, id: storedProcedureId); return(this.ProcessStreamOperationAsync( resourceUri: linkUri, resourceType: ResourceType.StoredProcedure, operationType: OperationType.ExecuteJavaScript, partitionKey: partitionKey, streamPayload: streamPayload, requestOptions: requestOptions, cancellationToken: cancellationToken)); }
public Task <ResponseMessage> ExecuteStoredProcedureStreamAsync( CosmosDiagnosticsContext diagnosticsContext, string storedProcedureId, Stream streamPayload, Cosmos.PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions, ITrace trace, CancellationToken cancellationToken) { if (string.IsNullOrEmpty(storedProcedureId)) { throw new ArgumentNullException(nameof(storedProcedureId)); } ContainerInternal.ValidatePartitionKey(partitionKey, requestOptions); string linkUri = this.ClientContext.CreateLink( parentLink: this.container.LinkUri, uriPathSegment: Paths.StoredProceduresPathSegment, id: storedProcedureId); return(this.ProcessStreamOperationAsync( diagnosticsContext: diagnosticsContext, resourceUri: linkUri, resourceType: ResourceType.StoredProcedure, operationType: OperationType.ExecuteJavaScript, partitionKey: partitionKey, streamPayload: streamPayload, requestOptions: requestOptions, trace: trace, cancellationToken: cancellationToken)); }