/// <summary> /// Get entity from contacts by key /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='contactid'> /// key: contactid of contact /// </param> /// <param name='select'> /// Select properties to be returned /// </param> /// <param name='expand'> /// Expand related entities /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <MicrosoftDynamicsCRMcontact> GetByKeyAsync(this IContacts operations, string contactid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetByKeyWithHttpMessagesAsync(contactid, select, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get entity from contacts by key /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='contactid'> /// key: contactid of contact /// </param> /// <param name='select'> /// Select properties to be returned /// </param> /// <param name='expand'> /// Expand related entities /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse <MicrosoftDynamicsCRMcontact> GetByKeyWithHttpMessages(this IContacts operations, string contactid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), Dictionary <string, List <string> > customHeaders = null) { return(operations.GetByKeyWithHttpMessagesAsync(contactid, select, expand, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }