Exemplo n.º 1
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.Paths            = new Paths(this);
     this.Queries          = new Queries(this);
     this.PathItems        = new PathItems(this);
     this.BaseUri          = new Uri("http://localhost");
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Formatting.Indented,
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.Paths            = new Paths(this);
     this.Queries          = new Queries(this);
     this.PathItems        = new PathItems(this);
     this.BaseUri          = new System.Uri("http://localhost");
     SerializationSettings = new Newtonsoft.Json.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 Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(),
         Converters            = new  System.Collections.Generic.List <Newtonsoft.Json.JsonConverter>
         {
             new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(),
         Converters            = new System.Collections.Generic.List <Newtonsoft.Json.JsonConverter>
         {
             new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
 /// <summary>
 /// send globalStringPath='globalStringPath',
 /// pathItemStringPath='pathItemStringPath', localStringPath='localStringPath',
 /// globalStringQuery=null, pathItemStringQuery='pathItemStringQuery',
 /// localStringQuery='localStringQuery'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='localStringPath'>
 /// should contain value 'localStringPath'
 /// </param>
 /// <param name='pathItemStringPath'>
 /// A string value 'pathItemStringPath' that appears in the path
 /// </param>
 /// <param name='localStringQuery'>
 /// should contain value 'localStringQuery'
 /// </param>
 /// <param name='pathItemStringQuery'>
 /// A string value 'pathItemStringQuery' that appears as a query parameter
 /// </param>
 public static void GetGlobalQueryNull(this IPathItems operations, string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string))
 {
     operations.GetGlobalQueryNullAsync(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery).GetAwaiter().GetResult();
 }
 /// <summary>
 /// send globalStringPath='globalStringPath',
 /// pathItemStringPath='pathItemStringPath', localStringPath='localStringPath',
 /// globalStringQuery='globalStringQuery',
 /// pathItemStringQuery='pathItemStringQuery',
 /// localStringQuery='localStringQuery'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='localStringPath'>
 /// should contain value 'localStringPath'
 /// </param>
 /// <param name='pathItemStringPath'>
 /// A string value 'pathItemStringPath' that appears in the path
 /// </param>
 /// <param name='localStringQuery'>
 /// should contain value 'localStringQuery'
 /// </param>
 /// <param name='pathItemStringQuery'>
 /// A string value 'pathItemStringQuery' that appears as a query parameter
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task GetAllWithValuesAsync(this IPathItems operations, string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.GetAllWithValuesWithHttpMessagesAsync(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// send globalStringPath='globalStringPath',
 /// pathItemStringPath='pathItemStringPath', localStringPath='localStringPath',
 /// globalStringQuery='globalStringQuery',
 /// pathItemStringQuery='pathItemStringQuery',
 /// localStringQuery='localStringQuery'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='localStringPath'>
 /// should contain value 'localStringPath'
 /// </param>
 /// <param name='pathItemStringPath'>
 /// A string value 'pathItemStringPath' that appears in the path
 /// </param>
 /// <param name='localStringQuery'>
 /// should contain value 'localStringQuery'
 /// </param>
 /// <param name='pathItemStringQuery'>
 /// A string value 'pathItemStringQuery' that appears as a query parameter
 /// </param>
 public static void GetAllWithValues(this IPathItems operations, string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string))
 {
     operations.GetAllWithValuesAsync(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery).GetAwaiter().GetResult();
 }
Exemplo n.º 6
0
 /// <summary>
 /// send globalStringPath='globalStringPath',
 /// pathItemStringPath='pathItemStringPath',
 /// localStringPath='localStringPath', globalStringQuery=null,
 /// pathItemStringQuery='pathItemStringQuery',
 /// localStringQuery='localStringQuery'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='localStringPath'>
 /// should contain value 'localStringPath'
 /// </param>
 /// <param name='pathItemStringPath'>
 /// A string value 'pathItemStringPath' that appears in the path
 /// </param>
 /// <param name='localStringQuery'>
 /// should contain value 'localStringQuery'
 /// </param>
 /// <param name='pathItemStringQuery'>
 /// A string value 'pathItemStringQuery' that appears as a query parameter
 /// </param>
 public static void GetGlobalQueryNull(this IPathItems operations, string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string))
 {
     Task.Factory.StartNew(s => ((IPathItems)s).GetGlobalQueryNullAsync(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Exemplo n.º 7
0
 /// <summary>
 /// send globalStringPath=globalStringPath,
 /// pathItemStringPath='pathItemStringPath',
 /// localStringPath='localStringPath', globalStringQuery=null,
 /// pathItemStringQuery='pathItemStringQuery', localStringQuery=null
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='localStringPath'>
 /// should contain value 'localStringPath'
 /// </param>
 /// <param name='pathItemStringPath'>
 /// A string value 'pathItemStringPath' that appears in the path
 /// </param>
 /// <param name='localStringQuery'>
 /// should contain null value
 /// </param>
 /// <param name='pathItemStringQuery'>
 /// A string value 'pathItemStringQuery' that appears as a query parameter
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task GetGlobalAndLocalQueryNullAsync(this IPathItems operations, string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.GetGlobalAndLocalQueryNullWithHttpMessagesAsync(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery, null, cancellationToken).ConfigureAwait(false);
 }
Exemplo n.º 8
0
 /// <summary>
 /// send globalStringPath='globalStringPath',
 /// pathItemStringPath='pathItemStringPath', localStringPath='localStringPath',
 /// globalStringQuery='globalStringQuery',
 /// pathItemStringQuery='pathItemStringQuery',
 /// localStringQuery='localStringQuery'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='localStringPath'>
 /// should contain value 'localStringPath'
 /// </param>
 /// <param name='pathItemStringPath'>
 /// A string value 'pathItemStringPath' that appears in the path
 /// </param>
 /// <param name='localStringQuery'>
 /// should contain value 'localStringQuery'
 /// </param>
 /// <param name='pathItemStringQuery'>
 /// A string value 'pathItemStringQuery' that appears as a query parameter
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task GetAllWithValuesAsync(this IPathItems operations, string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     await operations.GetAllWithValuesWithHttpMessagesAsync(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery, null, cancellationToken).ConfigureAwait(false);
 }
Exemplo n.º 9
0
 /// <summary>
 /// send globalStringPath='globalStringPath',
 /// pathItemStringPath='pathItemStringPath', localStringPath='localStringPath',
 /// globalStringQuery='globalStringQuery',
 /// pathItemStringQuery='pathItemStringQuery',
 /// localStringQuery='localStringQuery'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='localStringPath'>
 /// should contain value 'localStringPath'
 /// </param>
 /// <param name='pathItemStringPath'>
 /// A string value 'pathItemStringPath' that appears in the path
 /// </param>
 /// <param name='localStringQuery'>
 /// should contain value 'localStringQuery'
 /// </param>
 /// <param name='pathItemStringQuery'>
 /// A string value 'pathItemStringQuery' that appears as a query parameter
 /// </param>
 public static void GetAllWithValues(this IPathItems operations, string localStringPath, string pathItemStringPath, string localStringQuery = default(string), string pathItemStringQuery = default(string))
 {
     System.Threading.Tasks.Task.Factory.StartNew(s => ((IPathItems)s).GetAllWithValuesAsync(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }