<a id=“SuperOffice_WebApi_Agents_NumberAllocationAgent”></a> Class NumberAllocationAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll This agent can be used to manage number allocation
Inheritance
object ← AgentBase ← NumberAllocationAgentImplements
INumberAllocationAgent, IAgentBase, IDisposableInherited Members
AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T>(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Examples
<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“http://example.com/super/api”); mySession.Authorization = new AuthorizationUsernamePassword(“user”, “pass”); using (NumberAllocationAgent agent = new NumberAllocationAgent(mySession)) { // call methods on agent here… }</code></pre>Constructors
<a id=“SuperOffice_WebApi_Agents_NumberAllocationAgent__ctor_System_Net_Http_HttpClient_”></a> NumberAllocationAgent(HttpClient)
Constructor: This agent can be used to manage number allocationParameters
httpClient HttpClient
Use this HTTP client instead of making own HttpClient instance.
<a id=“SuperOffice_WebApi_Agents_NumberAllocationAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> NumberAllocationAgent(WebApiOptions, HttpClient)
Constructor: This agent can be used to manage number allocationParameters
options WebApiOptions
Base URL and authentication values.
httpClient HttpClient
Optional: Use this HTTP client instead of making a new one.
Methods
<a id=“SuperOffice_WebApi_Agents_NumberAllocationAgent_CreateDefaultRefCountEntityAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultRefCountEntityAsync(RequestOptions)
Set default values into a new RefCountEntity. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RefCountEntity> A blank RefCountEntity<a id=“SuperOffice_WebApi_Agents_NumberAllocationAgent_DeleteRefCountEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteRefCountEntityAsync(int, RequestOptions)
Deletes the RefCountEntityParameters
refCountEntityId int
The identity of the RefCountEntity
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_NumberAllocationAgent_GetNumberEachTemplateAsync_SuperOffice_WebApi_RequestOptions_”></a> GetNumberEachTemplateAsync(RequestOptions)
Returns true or false if Automatically create new counters for new document templatesParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> Is NumberEachTemplate?<a id=“SuperOffice_WebApi_Agents_NumberAllocationAgent_GetRefCountEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetRefCountEntityAsync(int, RequestOptions)
Gets a specific RefCountEntity object.Parameters
refCountEntityId int
The identifier of the RefCountEntity object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RefCountEntity> RefCountEntity<a id=“SuperOffice_WebApi_Agents_NumberAllocationAgent_SaveDefaultNumberingAsync_SuperOffice_WebApi_Data_RefCountEntity_SuperOffice_WebApi_RequestOptions_”></a> SaveDefaultNumberingAsync(RefCountEntity, RequestOptions)
Saves default numbering values in preferencesParameters
refCountEntity RefCountEntity
The refCountEntity that holds the values that will be saved
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task void<a id=“SuperOffice_WebApi_Agents_NumberAllocationAgent_SaveRefCountEntityAsync_SuperOffice_WebApi_Data_RefCountEntity_SuperOffice_WebApi_RequestOptions_”></a> SaveRefCountEntityAsync(RefCountEntity, RequestOptions)
Updates the existing RefCountEntity or creates a new RefCountEntity if the id parameter is 0.Parameters
refCountEntity RefCountEntity
The RefCountEntity that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RefCountEntity> New or updated RefCountEntity<a id=“SuperOffice_WebApi_Agents_NumberAllocationAgent_SetNumberEachTemplateAsync_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> SetNumberEachTemplateAsync(bool, RequestOptions)
Saves true or false if Automatically create new counters for new document templatesParameters
setValue bool
true or false if Automatically create new counters for new document templates
requestOptions RequestOptions
Override language/culture codes on this request.