Class RelationAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Contact/Person relations
Inheritance
object ← AgentBase ← RelationAgentImplements
IRelationAgent, 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 (RelationAgent agent = new RelationAgent(mySession)) { // call methods on agent here… }</code></pre>Constructors
RelationAgent(HttpClient)
Constructor: Contact/Person relationsParameters
httpClient HttpClient
Use this HTTP client instead of making own HttpClient instance.
RelationAgent(WebApiOptions, HttpClient)
Constructor: Contact/Person relationsParameters
options WebApiOptions
Base URL and authentication values.
httpClient HttpClient
Optional: Use this HTTP client instead of making a new one.
Methods
CreateDefaultContactRelationEntityAsync(RequestOptions)
Set default values into a new ContactRelationEntity. 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<ContactRelationEntity> A blank ContactRelationEntityDeleteContactRelationAsync(int, RequestOptions)
Deletes the spesified contact relation.Parameters
contactRelationEntityId int
Relation to delete
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskGetContactRelationEntityAsync(int, RequestOptions)
Gets a specific ContactRelationEntity object.Parameters
contactRelationEntityId int
The identifier of the ContactRelationEntity object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ContactRelationEntity> ContactRelationEntitySaveContactRelationAsync(ContactRelationEntity, RequestOptions)
Creates a new or updates an existing contact relation.Parameters
contactRelationEntity ContactRelationEntity
Relation to save
requestOptions RequestOptions
Override language/culture codes on this request.