/// <summary> /// Returns all SystemEventType which fit the filter criteria supplied. All /// filter parameters are optional. SystemEventType will be ordered and paged /// as requested. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// Filtered by Name. /// </param> /// <param name='orderBy'> /// SystemEventType will be returned in this order. NameAscending by default. /// Possible values include: 'NameAscending', 'NameDescending' /// </param> /// <param name='take'> /// Number of SystemEventType that should be returned. 200 by default. /// </param> /// <param name='skip'> /// Number of SystemEventType that should be skipped before items are /// returned. 0 by default. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <SystemEventTypeModel> > RetrieveAsync(this ISystemEventTypes operations, string name = default(string), string orderBy = default(string), int?take = default(int?), int?skip = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.RetrieveWithHttpMessagesAsync(name, orderBy, take, skip, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns the Name property for the SystemEventType with the Id provided. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Id of the SystemEventType whose Name property is to be returned. Must be /// double URL encoded. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <string> RetrieveNameAsync(this ISystemEventTypes operations, string id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.RetrieveNameWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns the SystemEventType with the Id provided. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Id of the SystemEventType requested. Must be double URL encoded. /// </param> public static SystemEventTypeModel RetrieveById(this ISystemEventTypes operations, string id) { return(Task.Factory.StartNew(s => ((ISystemEventTypes)s).RetrieveByIdAsync(id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Returns all SystemEventType which fit the filter criteria supplied. All /// filter parameters are optional. SystemEventType will be ordered and paged /// as requested. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// Filtered by Name. /// </param> /// <param name='orderBy'> /// SystemEventType will be returned in this order. NameAscending by default. /// Possible values include: 'NameAscending', 'NameDescending' /// </param> /// <param name='take'> /// Number of SystemEventType that should be returned. 200 by default. /// </param> /// <param name='skip'> /// Number of SystemEventType that should be skipped before items are /// returned. 0 by default. /// </param> public static IList <SystemEventTypeModel> Retrieve(this ISystemEventTypes operations, string name = default(string), string orderBy = default(string), int?take = default(int?), int?skip = default(int?)) { return(Task.Factory.StartNew(s => ((ISystemEventTypes)s).RetrieveAsync(name, orderBy, take, skip), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }