private void Configure() { configuration = new Configuration { Username = "******", Password = "******", }; dcApi = new DataCenterApi(configuration); volumeApi = new VolumeApi(configuration); snapshotApi = new SnapshotApi(configuration); //Create a datacenter. if (datacenter == null) { datacenter = new Datacenter { Properties = new DatacenterProperties { Name = ".Net V2 - Test " + DateTime.Now.ToShortTimeString(), Description = "Unit test for .Net SDK PB REST V2", Location = "us/lasdev" } }; datacenter = dcApi.Create(datacenter); } if (volume == null) { volume = new Volume { Properties = new VolumeProperties { Size = 1, LicenceType = "LINUX", Type = "HDD", Name = ".Net V2 - Test " + DateTime.Now.ToShortTimeString(), } }; volume = volumeApi.Create(datacenter.Id, volume); DoWait(volume.Request); } }
public static async Task <IWeatherResult> GetWeatherAsync(this ISnapshotApi api, GoogleApiClient client) { return((await api.GetWeather(client)).JavaCast <IWeatherResult> ()); }
public static async Task <IPlacesResult> GetPlacesAsync(this ISnapshotApi api, GoogleApiClient client) { return((await api.GetPlaces(client)).JavaCast <IPlacesResult> ()); }
public static async Task <ILocationResult> GetLocationAsync(this ISnapshotApi api, GoogleApiClient client) { return((await api.GetLocation(client)).JavaCast <ILocationResult> ()); }
public static async Task <IHeadphoneStateResult> GetHeadphoneStateAsync(this ISnapshotApi api, GoogleApiClient client) { return((await api.GetHeadphoneState(client)).JavaCast <IHeadphoneStateResult> ()); }
public static async Task <IDetectedActivityResult> GetDetectedActivityAsync(this ISnapshotApi api, GoogleApiClient client) { return((await api.GetDetectedActivity(client)).JavaCast <IDetectedActivityResult> ()); }
public static async Task <IBeaconStateResult> GetBeaconStateAsync(this ISnapshotApi api, GoogleApiClient client, System.Collections.Generic.ICollection <BeaconStateTypeFilter> beaconTypes) { return((await api.GetBeaconState(client)).JavaCast <IBeaconStateResult> ()); }
public static async Task <IBeaconStateResult> GetBeaconStateAsync(this ISnapshotApi api, GoogleApiClient client, BeaconStateTypeFilter [] beaconTypes) { return((await api.GetBeaconState(client)).JavaCast <IBeaconStateResult> ()); }
public QueueCheckJob(IQueue queue, ISnapshotApi snapshot) { _queue = queue; _snapshot = snapshot; }