Esempio n. 1
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.XMsClientRequestId = new XMsClientRequestIdOperations(this);
     this.SubscriptionInCredentials = new SubscriptionInCredentialsOperations(this);
     this.SubscriptionInMethod = new SubscriptionInMethodOperations(this);
     this.ApiVersionDefault = new ApiVersionDefaultOperations(this);
     this.ApiVersionLocal = new ApiVersionLocalOperations(this);
     this.SkipUrlEncoding = new SkipUrlEncodingOperations(this);
     this.BaseUri = new Uri("http://localhost");
     this.ApiVersion = "2015-07-01-preview";
     this.AcceptLanguage = "en-US";
     if (this.Credentials != null)
     {
         this.Credentials.InitializeServiceClient(this);
     }
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting = Formatting.Indented,
         DateFormatHandling = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling = DateTimeZoneHandling.Utc,
         NullValueHandling = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver = new ReadOnlyJsonContractResolver()
     };
     SerializationSettings.Converters.Add(new ResourceJsonConverter()); 
     DeserializationSettings = new JsonSerializerSettings{
         DateFormatHandling = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling = DateTimeZoneHandling.Utc,
         NullValueHandling = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver = new ReadOnlyJsonContractResolver()
     };
     DeserializationSettings.Converters.Add(new ResourceJsonConverter()); 
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); 
 }    
 /// <summary>
 /// Get method with unencoded path parameter with value 'path1/path2/path3'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static void GetSwaggerPathValid(this ISkipUrlEncodingOperations operations)
 {
     Task.Factory.StartNew(s => ((ISkipUrlEncodingOperations)s).GetSwaggerPathValidAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Get method with unencoded path parameter with value 'path1/path2/path3'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='unencodedPathParam'>
 /// Unencoded path parameter with value 'path1/path2/path3'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task GetPathPathValidAsync(this ISkipUrlEncodingOperations operations, string unencodedPathParam, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.GetPathPathValidWithHttpMessagesAsync(unencodedPathParam, null, cancellationToken).ConfigureAwait(false);
 }
 /// <summary>
 /// Get method with unencoded query parameter with value
 /// 'value1&amp;q2=value2&amp;q3=value3'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task GetSwaggerQueryValidAsync(this ISkipUrlEncodingOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.GetSwaggerQueryValidWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false);
 }
 /// <summary>
 /// Get method with unencoded query parameter with value null
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='q1'>
 /// Unencoded query parameter with value null
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task GetMethodQueryNullAsync(this ISkipUrlEncodingOperations operations, string q1 = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.GetMethodQueryNullWithHttpMessagesAsync(q1, null, cancellationToken).ConfigureAwait(false);
 }
 /// <summary>
 /// Get method with unencoded query parameter with value null
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='q1'>
 /// Unencoded query parameter with value null
 /// </param>
 public static void GetMethodQueryNull(this ISkipUrlEncodingOperations operations, string q1 = default(string))
 {
     Task.Factory.StartNew(s => ((ISkipUrlEncodingOperations)s).GetMethodQueryNullAsync(q1), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Esempio n. 7
0
 /// <summary>
 /// Get method with unencoded path parameter with value 'path1/path2/path3'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static void GetSwaggerPathValid(this ISkipUrlEncodingOperations operations)
 {
     operations.GetSwaggerPathValidAsync().GetAwaiter().GetResult();
 }
Esempio n. 8
0
 /// <summary>
 /// Get method with unencoded path parameter with value 'path1/path2/path3'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='unencodedPathParam'>
 /// Unencoded path parameter with value 'path1/path2/path3'
 /// </param>
 public static void GetPathPathValid(this ISkipUrlEncodingOperations operations, string unencodedPathParam)
 {
     operations.GetPathPathValidAsync(unencodedPathParam).GetAwaiter().GetResult();
 }
Esempio n. 9
0
 /// <summary>
 /// Get method with unencoded query parameter with value
 /// 'value1&amp;q2=value2&amp;q3=value3'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='q1'>
 /// Unencoded query parameter with value 'value1&amp;q2=value2&amp;q3=value3'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task GetPathQueryValidAsync(this ISkipUrlEncodingOperations operations, string q1, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.GetPathQueryValidWithHttpMessagesAsync(q1, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Esempio n. 10
0
 /// <summary>
 /// Get method with unencoded query parameter with value
 /// 'value1&amp;q2=value2&amp;q3=value3'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='q1'>
 /// Unencoded query parameter with value 'value1&amp;q2=value2&amp;q3=value3'
 /// </param>
 public static void GetPathQueryValid(this ISkipUrlEncodingOperations operations, string q1)
 {
     operations.GetPathQueryValidAsync(q1).GetAwaiter().GetResult();
 }
Esempio n. 11
0
 /// <summary>
 /// Get method with unencoded query parameter with value null
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='q1'>
 /// Unencoded query parameter with value null
 /// </param>
 public static void GetMethodQueryNull(this ISkipUrlEncodingOperations operations, string q1 = default(string))
 {
     operations.GetMethodQueryNullAsync(q1).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Get method with unencoded path parameter with value 'path1/path2/path3'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='unencodedPathParam'>
 /// Unencoded path parameter with value 'path1/path2/path3'
 /// </param>
 public static void GetPathPathValid(this ISkipUrlEncodingOperations operations, string unencodedPathParam)
 {
     System.Threading.Tasks.Task.Factory.StartNew(s => ((ISkipUrlEncodingOperations)s).GetPathPathValidAsync(unencodedPathParam), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Get method with unencoded query parameter with value
 /// 'value1&amp;q2=value2&amp;q3=value3'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='q1'>
 /// Unencoded query parameter with value 'value1&amp;q2=value2&amp;q3=value3'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task GetPathQueryValidAsync(this ISkipUrlEncodingOperations operations, string q1, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     await operations.GetPathQueryValidWithHttpMessagesAsync(q1, null, cancellationToken).ConfigureAwait(false);
 }