Esempio n. 1
0
 /// <summary>
 /// Get enum value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <Colors?> GetReferencedAsync(this IEnumModel operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.GetReferencedWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Get value 'green-color' from the constant.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RefColorConstant> GetReferencedConstantAsync(this IEnumModel operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetReferencedConstantWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     StringModel           = new StringModel(this);
     EnumModel             = new EnumModel(this);
     BaseUri               = new System.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();
 }
Esempio n. 4
0
 /// <summary>
 /// Get enum value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Colors?> GetNotExpandableAsync(this IEnumModel operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetNotExpandableWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.StringModel      = new StringModel(this);
     this.EnumModel        = new EnumModel(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();
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.StringModel      = new StringModel(this);
     this.EnumModel        = new EnumModel(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()
     };
     DeserializationSettings = new JsonSerializerSettings {
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver()
     };
 }
Esempio n. 7
0
 /// <summary>
 /// Sends value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='enumStringBody'>
 /// Possible values include: 'red color', 'green-color', 'blue_color'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PutReferencedAsync(this IEnumModel operations, Colors enumStringBody, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.PutReferencedWithHttpMessagesAsync(enumStringBody, null, cancellationToken).ConfigureAwait(false);
 }
 /// <summary>
 /// Get enum value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static Colors?GetReferenced(this IEnumModel operations)
 {
     return(operations.GetReferencedAsync().GetAwaiter().GetResult());
 }
Esempio n. 9
0
 /// <summary>
 /// Sends value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='stringBody'>
 /// Possible values include: 'red color', 'green-color', 'blue_color'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PutNotExpandableAsync(this IEnumModel operations, Colors stringBody, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.PutNotExpandableWithHttpMessagesAsync(stringBody, null, cancellationToken).ConfigureAwait(false);
 }
Esempio n. 10
0
 /// <summary>
 /// Get value 'green-color' from the constant.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static RefColorConstant GetReferencedConstant(this IEnumModel operations)
 {
     return(operations.GetReferencedConstantAsync().GetAwaiter().GetResult());
 }
Esempio n. 11
0
 /// <summary>
 /// Sends value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='enumStringBody'>
 /// Possible values include: 'red color', 'green-color', 'blue_color'
 /// </param>
 public static void PutReferenced(this IEnumModel operations, Colors enumStringBody)
 {
     operations.PutReferencedAsync(enumStringBody).GetAwaiter().GetResult();
 }
Esempio n. 12
0
 /// <summary>
 /// Get enum value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static Colors?GetNotExpandable(this IEnumModel operations)
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IEnumModel)s).GetNotExpandableAsync(), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 13
0
 /// <summary>
 /// Get value 'green-color' from the constant.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static RefColorConstant GetReferencedConstant(this IEnumModel operations)
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IEnumModel)s).GetReferencedConstantAsync(), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 14
0
 /// <summary>
 /// Sends value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='enumStringBody'>
 /// Possible values include: 'red color', 'green-color', 'blue_color'
 /// </param>
 public static void PutReferenced(this IEnumModel operations, Colors enumStringBody)
 {
     System.Threading.Tasks.Task.Factory.StartNew(s => ((IEnumModel)s).PutReferencedAsync(enumStringBody), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Esempio n. 15
0
 /// <summary>
 /// Sends value 'green-color' from a constant
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='field1'>
 /// Sample string.
 /// </param>
 public static void PutReferencedConstant(this IEnumModel operations, string field1 = default(string))
 {
     Task.Factory.StartNew(s => ((IEnumModel)s).PutReferencedConstantAsync(field1), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Esempio n. 16
0
 /// <summary>
 /// Sends value 'green-color' from a constant
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='field1'>
 /// Sample string.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PutReferencedConstantAsync(this IEnumModel operations, string field1 = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.PutReferencedConstantWithHttpMessagesAsync(field1, null, cancellationToken).ConfigureAwait(false);
 }
Esempio n. 17
0
 /// <summary>
 /// Sends value 'green-color' from a constant
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='field1'>
 /// Sample string.
 /// </param>
 public static void PutReferencedConstant(this IEnumModel operations, string field1 = default(string))
 {
     operations.PutReferencedConstantAsync(field1).GetAwaiter().GetResult();
 }
Esempio n. 18
0
 /// <summary>
 /// Sends value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='stringBody'>
 /// Possible values include: 'red color', 'green-color', 'blue_color'
 /// </param>
 public static void PutNotExpandable(this IEnumModel operations, Colors stringBody)
 {
     Task.Factory.StartNew(s => ((IEnumModel)s).PutNotExpandableAsync(stringBody), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Esempio n. 19
0
 /// <summary>
 /// Get enum value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static Colors?GetNotExpandable(this IEnumModel operations)
 {
     return(operations.GetNotExpandableAsync().GetAwaiter().GetResult());
 }
Esempio n. 20
0
 /// <summary>
 /// Get enum value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static Colors?GetReferenced(this IEnumModel operations)
 {
     return(Task.Factory.StartNew(s => ((IEnumModel)s).GetReferencedAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 21
0
 /// <summary>
 /// Sends value 'red color' from enumeration of 'red color', 'green-color',
 /// 'blue_color'
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='stringBody'>
 /// Possible values include: 'red color', 'green-color', 'blue_color'
 /// </param>
 public static void PutNotExpandable(this IEnumModel operations, Colors stringBody)
 {
     operations.PutNotExpandableAsync(stringBody).GetAwaiter().GetResult();
 }