/// <summary> /// Get a Virtual Disk /// </summary> /// <remarks> /// Get a Virtual Disk /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VirtualDisk> GetAsync(this IVirtualDisksOperations operations, string id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Machines = new MachinesOperations(this); VirtualMachines = new VirtualMachinesOperations(this); VirtualDisks = new VirtualDisksOperations(this); BaseUri = new System.Uri("https://localhost:62189/compute"); AcceptLanguage = "en-US"; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new Eryph.ClientRuntime.ApiErrorJsonConverter()); }
/// <summary> /// Get list of Virtual Disks /// </summary> /// <remarks> /// Get list of Virtual Disks /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='count'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Eryph.ClientRuntime.IPage <VirtualDisk> > ListAsync(this IVirtualDisksOperations operations, bool?count = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(count, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get list of Virtual Disks /// </summary> /// <remarks> /// Get list of Virtual Disks /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='count'> /// </param> public static Eryph.ClientRuntime.IPage <VirtualDisk> List(this IVirtualDisksOperations operations, bool?count = default(bool?)) { return(operations.ListAsync(count).GetAwaiter().GetResult()); }
/// <summary> /// Get a Virtual Disk /// </summary> /// <remarks> /// Get a Virtual Disk /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> public static VirtualDisk Get(this IVirtualDisksOperations operations, string id) { return(operations.GetAsync(id).GetAwaiter().GetResult()); }
/// <summary> /// Get list of Virtual Disks /// </summary> /// <remarks> /// Get list of Virtual Disks /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static Eryph.ClientRuntime.IPage <VirtualDisk> ListNext(this IVirtualDisksOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }