Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #147 from speckleworks/nic/object-create-timeout-o…
Browse files Browse the repository at this point in the history
…verride

Adding ability to override timeout for object creating objects.
  • Loading branch information
didimitrie authored Jun 3, 2020
2 parents 72a7754 + 9d34bcd commit 02059ec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions SpeckleCore/ApiClient/SpeckleApiClientApiCalls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3030,21 +3030,23 @@ public async System.Threading.Tasks.Task<ResponseStreamDeltaDiff> StreamDeltaDif
/// <summary>ObjectCreate</summary>
/// <returns>All the users's projects.</returns>
/// <exception cref="SpeckleException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<ResponseObject> ObjectCreateAsync( System.Collections.Generic.IEnumerable<SpeckleObject> objects )
public Task<ResponseObject> ObjectCreateAsync( IEnumerable<SpeckleObject> objects, int timeoutMillisecondsOverride = 0 )
{
return ObjectCreateAsync( objects, System.Threading.CancellationToken.None );
return ObjectCreateAsync( objects, System.Threading.CancellationToken.None, timeoutMillisecondsOverride);
}

/// <summary>ObjectCreate</summary>
/// <returns>All the users's projects.</returns>
/// <exception cref="SpeckleException">A server side error occurred.</exception>
/// <param name="objects"></param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
public async System.Threading.Tasks.Task<ResponseObject> ObjectCreateAsync( System.Collections.Generic.IEnumerable<SpeckleObject> objects, System.Threading.CancellationToken cancellationToken )
/// <param name="timeoutMillisecondsOverride">Length of time in milliseconds to set as the timeout for this call</param>
public async Task<ResponseObject> ObjectCreateAsync(IEnumerable<SpeckleObject> objects, System.Threading.CancellationToken cancellationToken, int timeoutMillisecondsOverride = 0)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append( BaseUrl != null ? BaseUrl.TrimEnd( '/' ) : "" ).Append( "/objects" );

var client_ = GetHttpClient();
var client_ = (timeoutMillisecondsOverride == 0) ? GetHttpClient() : GetHttpClient(timeoutMillisecondsOverride);
try
{
using ( var request_ = new System.Net.Http.HttpRequestMessage() )
Expand Down

0 comments on commit 02059ec

Please sign in to comment.