예제 #1
0
 public OperationEntity(Operation Operation, params object[] args) : base(Operation)
 {
     foreach (object arg in args)
     {
         if (arg is ICollection <ModuleOperation> ModuleOperations)
         {
             ModuleOperationEntities = ModuleOperations.Select(model => new ModuleOperationEntity(model, model.Module)).ToList();
         }
     }
 }
예제 #2
0
 public ModuleEntity(Module Module, params object[] args) : base(Module)
 {
     foreach (object arg in args)
     {
         if (arg is ICollection <ModuleOperation> ModuleOperations)
         {
             ModuleOperationEntities = ModuleOperations.Select(model => new ModuleOperationEntity(model, model.Operation)).ToList();
         }
         if (arg is ICollection <ModuleRole> ModuleRoles)
         {
             ModuleRoleEntities = ModuleRoles.Select(model => new ModuleRoleEntity(model, model.Role)).ToList();
         }
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     AutomationAccount = new AutomationAccountOperations(this);
     Operations        = new Operations(this);
     Statistics        = new StatisticsOperations(this);
     Usages            = new UsagesOperations(this);
     Keys                                   = new KeysOperations(this);
     Certificate                            = new CertificateOperations(this);
     Connection                             = new ConnectionOperations(this);
     ConnectionType                         = new ConnectionTypeOperations(this);
     Credential                             = new CredentialOperations(this);
     DscConfiguration                       = new DscConfigurationOperations(this);
     HybridRunbookWorkerGroup               = new HybridRunbookWorkerGroupOperations(this);
     JobSchedule                            = new JobScheduleOperations(this);
     LinkedWorkspace                        = new LinkedWorkspaceOperations(this);
     Activity                               = new ActivityOperations(this);
     Module                                 = new ModuleOperations(this);
     ObjectDataTypes                        = new ObjectDataTypesOperations(this);
     Fields                                 = new FieldsOperations(this);
     Schedule                               = new ScheduleOperations(this);
     Variable                               = new VariableOperations(this);
     Webhook                                = new WebhookOperations(this);
     Watcher                                = new WatcherOperations(this);
     SoftwareUpdateConfigurations           = new SoftwareUpdateConfigurationsOperations(this);
     SoftwareUpdateConfigurationRuns        = new SoftwareUpdateConfigurationRunsOperations(this);
     SoftwareUpdateConfigurationMachineRuns = new SoftwareUpdateConfigurationMachineRunsOperations(this);
     SourceControl                          = new SourceControlOperations(this);
     SourceControlSyncJob                   = new SourceControlSyncJobOperations(this);
     SourceControlSyncJobStreams            = new SourceControlSyncJobStreamsOperations(this);
     Job       = new JobOperations(this);
     JobStream = new JobStreamOperations(this);
     AgentRegistrationInformation = new AgentRegistrationInformationOperations(this);
     DscNode                          = new DscNodeOperations(this);
     NodeReports                      = new NodeReportsOperations(this);
     DscCompilationJob                = new DscCompilationJobOperations(this);
     DscCompilationJobStream          = new DscCompilationJobStreamOperations(this);
     DscNodeConfiguration             = new DscNodeConfigurationOperations(this);
     NodeCountInformation             = new NodeCountInformationOperations(this);
     RunbookDraft                     = new RunbookDraftOperations(this);
     Runbook                          = new RunbookOperations(this);
     TestJobStreams                   = new TestJobStreamsOperations(this);
     TestJob                          = new TestJobOperations(this);
     Python2Package                   = new Python2PackageOperations(this);
     BaseUri                          = new System.Uri("https://management.azure.com");
     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()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     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()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }