Exemplo n.º 1
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Job              = new JobOperations(this);
     Pipeline         = new PipelineOperations(this);
     Recurrence       = new RecurrenceOperations(this);
     BaseUri          = "https://{accountName}.{adlaJobDnsSuffix}";
     AdlaJobDnsSuffix = "azuredatalakeanalytics.net";
     ApiVersion       = "2017-09-01-preview";
     AcceptLanguage   = "en-US";
     LongRunningOperationRetryTimeout = 30;
     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()
         }
     };
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <JobProperties>("type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <JobProperties>("type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <CreateJobProperties>("type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <CreateJobProperties>("type"));
     CustomInitialize();
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }