Exemplo n.º 1
0
 public PropertyContainer(Models.JobSpecification protocolObject) : base(BindingState.Bound)
 {
     this.CommonEnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollection(protocolObject.CommonEnvironmentSettings),
         nameof(CommonEnvironmentSettings),
         BindingAccess.Read | BindingAccess.Write);
     this.ConstraintsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Constraints, o => new JobConstraints(o)),
         nameof(Constraints),
         BindingAccess.Read | BindingAccess.Write);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         nameof(DisplayName),
         BindingAccess.Read | BindingAccess.Write);
     this.JobManagerTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobManagerTask, o => new JobManagerTask(o)),
         nameof(JobManagerTask),
         BindingAccess.Read | BindingAccess.Write);
     this.JobPreparationTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobPreparationTask, o => new JobPreparationTask(o)),
         nameof(JobPreparationTask),
         BindingAccess.Read | BindingAccess.Write);
     this.JobReleaseTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobReleaseTask, o => new JobReleaseTask(o)),
         nameof(JobReleaseTask),
         BindingAccess.Read | BindingAccess.Write);
     this.MaxParallelTasksProperty = this.CreatePropertyAccessor(
         protocolObject.MaxParallelTasks,
         nameof(MaxParallelTasks),
         BindingAccess.Read | BindingAccess.Write);
     this.MetadataProperty = this.CreatePropertyAccessor(
         MetadataItem.ConvertFromProtocolCollection(protocolObject.Metadata),
         nameof(Metadata),
         BindingAccess.Read | BindingAccess.Write);
     this.NetworkConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NetworkConfiguration, o => new JobNetworkConfiguration(o).Freeze()),
         nameof(NetworkConfiguration),
         BindingAccess.Read);
     this.OnAllTasksCompleteProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.OnAllTasksComplete, Common.OnAllTasksComplete>(protocolObject.OnAllTasksComplete),
         nameof(OnAllTasksComplete),
         BindingAccess.Read | BindingAccess.Write);
     this.OnTaskFailureProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.OnTaskFailure, Common.OnTaskFailure>(protocolObject.OnTaskFailure),
         nameof(OnTaskFailure),
         BindingAccess.Read | BindingAccess.Write);
     this.PoolInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.PoolInfo, o => new PoolInformation(o)),
         nameof(PoolInformation),
         BindingAccess.Read | BindingAccess.Write);
     this.PriorityProperty = this.CreatePropertyAccessor(
         protocolObject.Priority,
         nameof(Priority),
         BindingAccess.Read | BindingAccess.Write);
     this.UsesTaskDependenciesProperty = this.CreatePropertyAccessor(
         protocolObject.UsesTaskDependencies,
         nameof(UsesTaskDependencies),
         BindingAccess.Read | BindingAccess.Write);
 }
Exemplo n.º 2
0
 public PropertyContainer(Models.JobSpecification protocolObject) : base(BindingState.Bound)
 {
     this.CommonEnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollection(protocolObject.CommonEnvironmentSettings),
         "CommonEnvironmentSettings",
         BindingAccess.Read | BindingAccess.Write);
     this.ConstraintsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Constraints, o => new JobConstraints(o)),
         "Constraints",
         BindingAccess.Read | BindingAccess.Write);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         "DisplayName",
         BindingAccess.Read | BindingAccess.Write);
     this.JobManagerTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobManagerTask, o => new JobManagerTask(o)),
         "JobManagerTask",
         BindingAccess.Read | BindingAccess.Write);
     this.JobPreparationTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobPreparationTask, o => new JobPreparationTask(o)),
         "JobPreparationTask",
         BindingAccess.Read | BindingAccess.Write);
     this.JobReleaseTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobReleaseTask, o => new JobReleaseTask(o)),
         "JobReleaseTask",
         BindingAccess.Read | BindingAccess.Write);
     this.MetadataProperty = this.CreatePropertyAccessor(
         MetadataItem.ConvertFromProtocolCollection(protocolObject.Metadata),
         "Metadata",
         BindingAccess.Read | BindingAccess.Write);
     this.PoolInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.PoolInfo, o => new PoolInformation(o)),
         "PoolInformation",
         BindingAccess.Read | BindingAccess.Write);
     this.PriorityProperty = this.CreatePropertyAccessor(
         protocolObject.Priority,
         "Priority",
         BindingAccess.Read | BindingAccess.Write);
     this.UsesTaskDependenciesProperty = this.CreatePropertyAccessor(
         protocolObject.UsesTaskDependencies,
         "UsesTaskDependencies",
         BindingAccess.Read | BindingAccess.Write);
 }
Exemplo n.º 3
0
 public PropertyContainer(Models.PoolSpecification protocolObject) : base(BindingState.Bound)
 {
     this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor(
         ApplicationPackageReference.ConvertFromProtocolCollection(protocolObject.ApplicationPackageReferences),
         "ApplicationPackageReferences",
         BindingAccess.Read | BindingAccess.Write);
     this.AutoScaleEnabledProperty = this.CreatePropertyAccessor(
         protocolObject.EnableAutoScale,
         "AutoScaleEnabled",
         BindingAccess.Read | BindingAccess.Write);
     this.AutoScaleEvaluationIntervalProperty = this.CreatePropertyAccessor(
         protocolObject.AutoScaleEvaluationInterval,
         "AutoScaleEvaluationInterval",
         BindingAccess.Read | BindingAccess.Write);
     this.AutoScaleFormulaProperty = this.CreatePropertyAccessor(
         protocolObject.AutoScaleFormula,
         "AutoScaleFormula",
         BindingAccess.Read | BindingAccess.Write);
     this.CertificateReferencesProperty = this.CreatePropertyAccessor(
         CertificateReference.ConvertFromProtocolCollection(protocolObject.CertificateReferences),
         "CertificateReferences",
         BindingAccess.Read | BindingAccess.Write);
     this.CloudServiceConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.CloudServiceConfiguration, o => new CloudServiceConfiguration(o)),
         "CloudServiceConfiguration",
         BindingAccess.Read | BindingAccess.Write);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         "DisplayName",
         BindingAccess.Read | BindingAccess.Write);
     this.InterComputeNodeCommunicationEnabledProperty = this.CreatePropertyAccessor(
         protocolObject.EnableInterNodeCommunication,
         "InterComputeNodeCommunicationEnabled",
         BindingAccess.Read);
     this.MaxTasksPerComputeNodeProperty = this.CreatePropertyAccessor(
         protocolObject.MaxTasksPerNode,
         "MaxTasksPerComputeNode",
         BindingAccess.Read | BindingAccess.Write);
     this.MetadataProperty = this.CreatePropertyAccessor(
         MetadataItem.ConvertFromProtocolCollection(protocolObject.Metadata),
         "Metadata",
         BindingAccess.Read | BindingAccess.Write);
     this.NetworkConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NetworkConfiguration, o => new NetworkConfiguration(o).Freeze()),
         "NetworkConfiguration",
         BindingAccess.Read);
     this.ResizeTimeoutProperty = this.CreatePropertyAccessor(
         protocolObject.ResizeTimeout,
         "ResizeTimeout",
         BindingAccess.Read | BindingAccess.Write);
     this.StartTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTask, o => new StartTask(o)),
         "StartTask",
         BindingAccess.Read | BindingAccess.Write);
     this.TargetDedicatedProperty = this.CreatePropertyAccessor(
         protocolObject.TargetDedicated,
         "TargetDedicated",
         BindingAccess.Read | BindingAccess.Write);
     this.TaskSchedulingPolicyProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.TaskSchedulingPolicy, o => new TaskSchedulingPolicy(o)),
         "TaskSchedulingPolicy",
         BindingAccess.Read | BindingAccess.Write);
     this.VirtualMachineConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.VirtualMachineConfiguration, o => new VirtualMachineConfiguration(o)),
         "VirtualMachineConfiguration",
         BindingAccess.Read | BindingAccess.Write);
     this.VirtualMachineSizeProperty = this.CreatePropertyAccessor(
         protocolObject.VmSize,
         "VirtualMachineSize",
         BindingAccess.Read | BindingAccess.Write);
 }
Exemplo n.º 4
0
 public PropertyContainer(Models.CloudJob protocolObject) : base(BindingState.Bound)
 {
     this.CommonEnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollectionAndFreeze(protocolObject.CommonEnvironmentSettings),
         nameof(CommonEnvironmentSettings),
         BindingAccess.Read);
     this.ConstraintsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Constraints, o => new JobConstraints(o)),
         nameof(Constraints),
         BindingAccess.Read | BindingAccess.Write);
     this.CreationTimeProperty = this.CreatePropertyAccessor(
         protocolObject.CreationTime,
         nameof(CreationTime),
         BindingAccess.Read);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         nameof(DisplayName),
         BindingAccess.Read);
     this.ETagProperty = this.CreatePropertyAccessor(
         protocolObject.ETag,
         nameof(ETag),
         BindingAccess.Read);
     this.ExecutionInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ExecutionInfo, o => new JobExecutionInformation(o).Freeze()),
         nameof(ExecutionInformation),
         BindingAccess.Read);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         nameof(Id),
         BindingAccess.Read);
     this.JobManagerTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobManagerTask, o => new JobManagerTask(o).Freeze()),
         nameof(JobManagerTask),
         BindingAccess.Read);
     this.JobPreparationTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobPreparationTask, o => new JobPreparationTask(o).Freeze()),
         nameof(JobPreparationTask),
         BindingAccess.Read);
     this.JobReleaseTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobReleaseTask, o => new JobReleaseTask(o).Freeze()),
         nameof(JobReleaseTask),
         BindingAccess.Read);
     this.LastModifiedProperty = this.CreatePropertyAccessor(
         protocolObject.LastModified,
         nameof(LastModified),
         BindingAccess.Read);
     this.MetadataProperty = this.CreatePropertyAccessor(
         MetadataItem.ConvertFromProtocolCollection(protocolObject.Metadata),
         nameof(Metadata),
         BindingAccess.Read | BindingAccess.Write);
     this.NetworkConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NetworkConfiguration, o => new JobNetworkConfiguration(o).Freeze()),
         nameof(NetworkConfiguration),
         BindingAccess.Read);
     this.OnAllTasksCompleteProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.OnAllTasksComplete, Common.OnAllTasksComplete>(protocolObject.OnAllTasksComplete),
         nameof(OnAllTasksComplete),
         BindingAccess.Read | BindingAccess.Write);
     this.OnTaskFailureProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.OnTaskFailure, Common.OnTaskFailure>(protocolObject.OnTaskFailure),
         nameof(OnTaskFailure),
         BindingAccess.Read);
     this.PoolInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.PoolInfo, o => new PoolInformation(o)),
         nameof(PoolInformation),
         BindingAccess.Read | BindingAccess.Write);
     this.PreviousStateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.JobState, Common.JobState>(protocolObject.PreviousState),
         nameof(PreviousState),
         BindingAccess.Read);
     this.PreviousStateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.PreviousStateTransitionTime,
         nameof(PreviousStateTransitionTime),
         BindingAccess.Read);
     this.PriorityProperty = this.CreatePropertyAccessor(
         protocolObject.Priority,
         nameof(Priority),
         BindingAccess.Read | BindingAccess.Write);
     this.StateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.JobState, Common.JobState>(protocolObject.State),
         nameof(State),
         BindingAccess.Read);
     this.StateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.StateTransitionTime,
         nameof(StateTransitionTime),
         BindingAccess.Read);
     this.StatisticsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Stats, o => new JobStatistics(o).Freeze()),
         nameof(Statistics),
         BindingAccess.Read);
     this.UrlProperty = this.CreatePropertyAccessor(
         protocolObject.Url,
         nameof(Url),
         BindingAccess.Read);
     this.UsesTaskDependenciesProperty = this.CreatePropertyAccessor(
         protocolObject.UsesTaskDependencies,
         nameof(UsesTaskDependencies),
         BindingAccess.Read);
 }
Exemplo n.º 5
0
 public PropertyContainer(Models.CloudPool protocolObject) : base(BindingState.Bound)
 {
     this.AllocationStateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.AllocationState, Common.AllocationState>(protocolObject.AllocationState),
         nameof(AllocationState),
         BindingAccess.Read);
     this.AllocationStateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.AllocationStateTransitionTime,
         nameof(AllocationStateTransitionTime),
         BindingAccess.Read);
     this.ApplicationLicensesProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CollectionToThreadSafeCollection(protocolObject.ApplicationLicenses, o => o),
         nameof(ApplicationLicenses),
         BindingAccess.Read);
     this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor(
         ApplicationPackageReference.ConvertFromProtocolCollection(protocolObject.ApplicationPackageReferences),
         nameof(ApplicationPackageReferences),
         BindingAccess.Read | BindingAccess.Write);
     this.AutoScaleEnabledProperty = this.CreatePropertyAccessor(
         protocolObject.EnableAutoScale,
         nameof(AutoScaleEnabled),
         BindingAccess.Read);
     this.AutoScaleEvaluationIntervalProperty = this.CreatePropertyAccessor(
         protocolObject.AutoScaleEvaluationInterval,
         nameof(AutoScaleEvaluationInterval),
         BindingAccess.Read);
     this.AutoScaleFormulaProperty = this.CreatePropertyAccessor(
         protocolObject.AutoScaleFormula,
         nameof(AutoScaleFormula),
         BindingAccess.Read);
     this.AutoScaleRunProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AutoScaleRun, o => new AutoScaleRun(o).Freeze()),
         nameof(AutoScaleRun),
         BindingAccess.Read);
     this.CertificateReferencesProperty = this.CreatePropertyAccessor(
         CertificateReference.ConvertFromProtocolCollection(protocolObject.CertificateReferences),
         nameof(CertificateReferences),
         BindingAccess.Read | BindingAccess.Write);
     this.CloudServiceConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.CloudServiceConfiguration, o => new CloudServiceConfiguration(o).Freeze()),
         nameof(CloudServiceConfiguration),
         BindingAccess.Read);
     this.CreationTimeProperty = this.CreatePropertyAccessor(
         protocolObject.CreationTime,
         nameof(CreationTime),
         BindingAccess.Read);
     this.CurrentDedicatedComputeNodesProperty = this.CreatePropertyAccessor(
         protocolObject.CurrentDedicatedNodes,
         nameof(CurrentDedicatedComputeNodes),
         BindingAccess.Read);
     this.CurrentLowPriorityComputeNodesProperty = this.CreatePropertyAccessor(
         protocolObject.CurrentLowPriorityNodes,
         nameof(CurrentLowPriorityComputeNodes),
         BindingAccess.Read);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         nameof(DisplayName),
         BindingAccess.Read);
     this.ETagProperty = this.CreatePropertyAccessor(
         protocolObject.ETag,
         nameof(ETag),
         BindingAccess.Read);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         nameof(Id),
         BindingAccess.Read);
     this.IdentityProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Identity, o => new BatchPoolIdentity(o)),
         nameof(Identity),
         BindingAccess.Read | BindingAccess.Write);
     this.InterComputeNodeCommunicationEnabledProperty = this.CreatePropertyAccessor(
         protocolObject.EnableInterNodeCommunication,
         nameof(InterComputeNodeCommunicationEnabled),
         BindingAccess.Read);
     this.LastModifiedProperty = this.CreatePropertyAccessor(
         protocolObject.LastModified,
         nameof(LastModified),
         BindingAccess.Read);
     this.MetadataProperty = this.CreatePropertyAccessor(
         MetadataItem.ConvertFromProtocolCollection(protocolObject.Metadata),
         nameof(Metadata),
         BindingAccess.Read | BindingAccess.Write);
     this.MountConfigurationProperty = this.CreatePropertyAccessor(
         Batch.MountConfiguration.ConvertFromProtocolCollectionAndFreeze(protocolObject.MountConfiguration),
         nameof(MountConfiguration),
         BindingAccess.Read);
     this.NetworkConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NetworkConfiguration, o => new NetworkConfiguration(o).Freeze()),
         nameof(NetworkConfiguration),
         BindingAccess.Read);
     this.ResizeErrorsProperty = this.CreatePropertyAccessor(
         ResizeError.ConvertFromProtocolCollectionReadOnly(protocolObject.ResizeErrors),
         nameof(ResizeErrors),
         BindingAccess.Read);
     this.ResizeTimeoutProperty = this.CreatePropertyAccessor(
         protocolObject.ResizeTimeout,
         nameof(ResizeTimeout),
         BindingAccess.Read);
     this.StartTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTask, o => new StartTask(o)),
         nameof(StartTask),
         BindingAccess.Read | BindingAccess.Write);
     this.StateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.PoolState, Common.PoolState>(protocolObject.State),
         nameof(State),
         BindingAccess.Read);
     this.StateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.StateTransitionTime,
         nameof(StateTransitionTime),
         BindingAccess.Read);
     this.StatisticsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Stats, o => new PoolStatistics(o).Freeze()),
         nameof(Statistics),
         BindingAccess.Read);
     this.TargetDedicatedComputeNodesProperty = this.CreatePropertyAccessor(
         protocolObject.TargetDedicatedNodes,
         nameof(TargetDedicatedComputeNodes),
         BindingAccess.Read);
     this.TargetLowPriorityComputeNodesProperty = this.CreatePropertyAccessor(
         protocolObject.TargetLowPriorityNodes,
         nameof(TargetLowPriorityComputeNodes),
         BindingAccess.Read);
     this.TaskSchedulingPolicyProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.TaskSchedulingPolicy, o => new TaskSchedulingPolicy(o).Freeze()),
         nameof(TaskSchedulingPolicy),
         BindingAccess.Read);
     this.TaskSlotsPerNodeProperty = this.CreatePropertyAccessor(
         protocolObject.TaskSlotsPerNode,
         nameof(TaskSlotsPerNode),
         BindingAccess.Read);
     this.UrlProperty = this.CreatePropertyAccessor(
         protocolObject.Url,
         nameof(Url),
         BindingAccess.Read);
     this.UserAccountsProperty = this.CreatePropertyAccessor(
         UserAccount.ConvertFromProtocolCollectionAndFreeze(protocolObject.UserAccounts),
         nameof(UserAccounts),
         BindingAccess.Read);
     this.VirtualMachineConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.VirtualMachineConfiguration, o => new VirtualMachineConfiguration(o).Freeze()),
         nameof(VirtualMachineConfiguration),
         BindingAccess.Read);
     this.VirtualMachineSizeProperty = this.CreatePropertyAccessor(
         protocolObject.VmSize,
         nameof(VirtualMachineSize),
         BindingAccess.Read);
 }
Exemplo n.º 6
0
 public PropertyContainer(Models.CloudJobSchedule protocolObject) : base(BindingState.Bound)
 {
     this.CreationTimeProperty = this.CreatePropertyAccessor(
         protocolObject.CreationTime,
         nameof(CreationTime),
         BindingAccess.Read);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         nameof(DisplayName),
         BindingAccess.Read);
     this.ETagProperty = this.CreatePropertyAccessor(
         protocolObject.ETag,
         nameof(ETag),
         BindingAccess.Read);
     this.ExecutionInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ExecutionInfo, o => new JobScheduleExecutionInformation(o).Freeze()),
         nameof(ExecutionInformation),
         BindingAccess.Read);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         nameof(Id),
         BindingAccess.Read);
     this.JobSpecificationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobSpecification, o => new JobSpecification(o)),
         nameof(JobSpecification),
         BindingAccess.Read | BindingAccess.Write);
     this.LastModifiedProperty = this.CreatePropertyAccessor(
         protocolObject.LastModified,
         nameof(LastModified),
         BindingAccess.Read);
     this.MetadataProperty = this.CreatePropertyAccessor(
         MetadataItem.ConvertFromProtocolCollection(protocolObject.Metadata),
         nameof(Metadata),
         BindingAccess.Read | BindingAccess.Write);
     this.PreviousStateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum<Models.JobScheduleState, Common.JobScheduleState>(protocolObject.PreviousState),
         nameof(PreviousState),
         BindingAccess.Read);
     this.PreviousStateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.PreviousStateTransitionTime,
         nameof(PreviousStateTransitionTime),
         BindingAccess.Read);
     this.ScheduleProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Schedule, o => new Schedule(o)),
         nameof(Schedule),
         BindingAccess.Read | BindingAccess.Write);
     this.StateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum<Models.JobScheduleState, Common.JobScheduleState>(protocolObject.State),
         nameof(State),
         BindingAccess.Read);
     this.StateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.StateTransitionTime,
         nameof(StateTransitionTime),
         BindingAccess.Read);
     this.StatisticsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Stats, o => new JobScheduleStatistics(o).Freeze()),
         nameof(Statistics),
         BindingAccess.Read);
     this.UrlProperty = this.CreatePropertyAccessor(
         protocolObject.Url,
         nameof(Url),
         BindingAccess.Read);
 }
Exemplo n.º 7
0
 public PropertyContainer(Models.CloudPool protocolObject) : base(BindingState.Bound)
 {
     this.AllocationStateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.AllocationState, Common.AllocationState>(protocolObject.AllocationState),
         "AllocationState",
         BindingAccess.Read);
     this.AllocationStateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.AllocationStateTransitionTime,
         "AllocationStateTransitionTime",
         BindingAccess.Read);
     this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor(
         ApplicationPackageReference.ConvertFromProtocolCollection(protocolObject.ApplicationPackageReferences),
         "ApplicationPackageReferences",
         BindingAccess.Read | BindingAccess.Write);
     this.AutoScaleEnabledProperty = this.CreatePropertyAccessor(
         protocolObject.EnableAutoScale,
         "AutoScaleEnabled",
         BindingAccess.Read);
     this.AutoScaleEvaluationIntervalProperty = this.CreatePropertyAccessor(
         protocolObject.AutoScaleEvaluationInterval,
         "AutoScaleEvaluationInterval",
         BindingAccess.Read);
     this.AutoScaleFormulaProperty = this.CreatePropertyAccessor(
         protocolObject.AutoScaleFormula,
         "AutoScaleFormula",
         BindingAccess.Read);
     this.AutoScaleRunProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AutoScaleRun, o => new AutoScaleRun(o).Freeze()),
         "AutoScaleRun",
         BindingAccess.Read);
     this.CertificateReferencesProperty = this.CreatePropertyAccessor(
         CertificateReference.ConvertFromProtocolCollection(protocolObject.CertificateReferences),
         "CertificateReferences",
         BindingAccess.Read | BindingAccess.Write);
     this.CloudServiceConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.CloudServiceConfiguration, o => new CloudServiceConfiguration(o).Freeze()),
         "CloudServiceConfiguration",
         BindingAccess.Read);
     this.CreationTimeProperty = this.CreatePropertyAccessor(
         protocolObject.CreationTime,
         "CreationTime",
         BindingAccess.Read);
     this.CurrentDedicatedProperty = this.CreatePropertyAccessor(
         protocolObject.CurrentDedicated,
         "CurrentDedicated",
         BindingAccess.Read);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         "DisplayName",
         BindingAccess.Read);
     this.ETagProperty = this.CreatePropertyAccessor(
         protocolObject.ETag,
         "ETag",
         BindingAccess.Read);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         "Id",
         BindingAccess.Read);
     this.InterComputeNodeCommunicationEnabledProperty = this.CreatePropertyAccessor(
         protocolObject.EnableInterNodeCommunication,
         "InterComputeNodeCommunicationEnabled",
         BindingAccess.Read);
     this.LastModifiedProperty = this.CreatePropertyAccessor(
         protocolObject.LastModified,
         "LastModified",
         BindingAccess.Read);
     this.MaxTasksPerComputeNodeProperty = this.CreatePropertyAccessor(
         protocolObject.MaxTasksPerNode,
         "MaxTasksPerComputeNode",
         BindingAccess.Read);
     this.MetadataProperty = this.CreatePropertyAccessor(
         MetadataItem.ConvertFromProtocolCollection(protocolObject.Metadata),
         "Metadata",
         BindingAccess.Read | BindingAccess.Write);
     this.NetworkConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NetworkConfiguration, o => new NetworkConfiguration(o).Freeze()),
         "NetworkConfiguration",
         BindingAccess.Read);
     this.ResizeErrorProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ResizeError, o => new ResizeError(o).Freeze()),
         "ResizeError",
         BindingAccess.Read);
     this.ResizeTimeoutProperty = this.CreatePropertyAccessor(
         protocolObject.ResizeTimeout,
         "ResizeTimeout",
         BindingAccess.Read);
     this.StartTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTask, o => new StartTask(o)),
         "StartTask",
         BindingAccess.Read | BindingAccess.Write);
     this.StateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.PoolState, Common.PoolState>(protocolObject.State),
         "State",
         BindingAccess.Read);
     this.StateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.StateTransitionTime,
         "StateTransitionTime",
         BindingAccess.Read);
     this.StatisticsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Stats, o => new PoolStatistics(o).Freeze()),
         "Statistics",
         BindingAccess.Read);
     this.TargetDedicatedProperty = this.CreatePropertyAccessor(
         protocolObject.TargetDedicated,
         "TargetDedicated",
         BindingAccess.Read);
     this.TaskSchedulingPolicyProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.TaskSchedulingPolicy, o => new TaskSchedulingPolicy(o).Freeze()),
         "TaskSchedulingPolicy",
         BindingAccess.Read);
     this.UrlProperty = this.CreatePropertyAccessor(
         protocolObject.Url,
         "Url",
         BindingAccess.Read);
     this.VirtualMachineConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.VirtualMachineConfiguration, o => new VirtualMachineConfiguration(o).Freeze()),
         "VirtualMachineConfiguration",
         BindingAccess.Read);
     this.VirtualMachineSizeProperty = this.CreatePropertyAccessor(
         protocolObject.VmSize,
         "VirtualMachineSize",
         BindingAccess.Read);
 }
Exemplo n.º 8
0
 public PropertyContainer(Models.PoolSpecification protocolObject) : base(BindingState.Bound)
 {
     this.ApplicationLicensesProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CollectionToThreadSafeCollection(protocolObject.ApplicationLicenses, o => o),
         nameof(ApplicationLicenses),
         BindingAccess.Read | BindingAccess.Write);
     this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor(
         ApplicationPackageReference.ConvertFromProtocolCollection(protocolObject.ApplicationPackageReferences),
         nameof(ApplicationPackageReferences),
         BindingAccess.Read | BindingAccess.Write);
     this.AutoScaleEnabledProperty = this.CreatePropertyAccessor(
         protocolObject.EnableAutoScale,
         nameof(AutoScaleEnabled),
         BindingAccess.Read | BindingAccess.Write);
     this.AutoScaleEvaluationIntervalProperty = this.CreatePropertyAccessor(
         protocolObject.AutoScaleEvaluationInterval,
         nameof(AutoScaleEvaluationInterval),
         BindingAccess.Read | BindingAccess.Write);
     this.AutoScaleFormulaProperty = this.CreatePropertyAccessor(
         protocolObject.AutoScaleFormula,
         nameof(AutoScaleFormula),
         BindingAccess.Read | BindingAccess.Write);
     this.CertificateReferencesProperty = this.CreatePropertyAccessor(
         CertificateReference.ConvertFromProtocolCollection(protocolObject.CertificateReferences),
         nameof(CertificateReferences),
         BindingAccess.Read | BindingAccess.Write);
     this.CloudServiceConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.CloudServiceConfiguration, o => new CloudServiceConfiguration(o)),
         nameof(CloudServiceConfiguration),
         BindingAccess.Read | BindingAccess.Write);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         nameof(DisplayName),
         BindingAccess.Read | BindingAccess.Write);
     this.InterComputeNodeCommunicationEnabledProperty = this.CreatePropertyAccessor(
         protocolObject.EnableInterNodeCommunication,
         nameof(InterComputeNodeCommunicationEnabled),
         BindingAccess.Read);
     this.MaxTasksPerComputeNodeProperty = this.CreatePropertyAccessor(
         protocolObject.MaxTasksPerNode,
         nameof(MaxTasksPerComputeNode),
         BindingAccess.Read | BindingAccess.Write);
     this.MetadataProperty = this.CreatePropertyAccessor(
         MetadataItem.ConvertFromProtocolCollection(protocolObject.Metadata),
         nameof(Metadata),
         BindingAccess.Read | BindingAccess.Write);
     this.NetworkConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NetworkConfiguration, o => new NetworkConfiguration(o).Freeze()),
         nameof(NetworkConfiguration),
         BindingAccess.Read);
     this.ResizeTimeoutProperty = this.CreatePropertyAccessor(
         protocolObject.ResizeTimeout,
         nameof(ResizeTimeout),
         BindingAccess.Read | BindingAccess.Write);
     this.StartTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTask, o => new StartTask(o)),
         nameof(StartTask),
         BindingAccess.Read | BindingAccess.Write);
     this.TargetDedicatedComputeNodesProperty = this.CreatePropertyAccessor(
         protocolObject.TargetDedicatedNodes,
         nameof(TargetDedicatedComputeNodes),
         BindingAccess.Read | BindingAccess.Write);
     this.TargetLowPriorityComputeNodesProperty = this.CreatePropertyAccessor(
         protocolObject.TargetLowPriorityNodes,
         nameof(TargetLowPriorityComputeNodes),
         BindingAccess.Read | BindingAccess.Write);
     this.TaskSchedulingPolicyProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.TaskSchedulingPolicy, o => new TaskSchedulingPolicy(o)),
         nameof(TaskSchedulingPolicy),
         BindingAccess.Read | BindingAccess.Write);
     this.UserAccountsProperty = this.CreatePropertyAccessor(
         UserAccount.ConvertFromProtocolCollection(protocolObject.UserAccounts),
         nameof(UserAccounts),
         BindingAccess.Read | BindingAccess.Write);
     this.VirtualMachineConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.VirtualMachineConfiguration, o => new VirtualMachineConfiguration(o)),
         nameof(VirtualMachineConfiguration),
         BindingAccess.Read | BindingAccess.Write);
     this.VirtualMachineSizeProperty = this.CreatePropertyAccessor(
         protocolObject.VmSize,
         nameof(VirtualMachineSize),
         BindingAccess.Read | BindingAccess.Write);
 }
Exemplo n.º 9
0
 public PropertyContainer(Models.CloudJob protocolObject) : base(BindingState.Bound)
 {
     this.CommonEnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollectionAndFreeze(protocolObject.CommonEnvironmentSettings),
         "CommonEnvironmentSettings",
         BindingAccess.Read);
     this.ConstraintsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Constraints, o => new JobConstraints(o)),
         "Constraints",
         BindingAccess.Read | BindingAccess.Write);
     this.CreationTimeProperty = this.CreatePropertyAccessor(
         protocolObject.CreationTime,
         "CreationTime",
         BindingAccess.Read);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         "DisplayName",
         BindingAccess.Read);
     this.ETagProperty = this.CreatePropertyAccessor(
         protocolObject.ETag,
         "ETag",
         BindingAccess.Read);
     this.ExecutionInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ExecutionInfo, o => new JobExecutionInformation(o).Freeze()),
         "ExecutionInformation",
         BindingAccess.Read);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         "Id",
         BindingAccess.Read);
     this.JobManagerTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobManagerTask, o => new JobManagerTask(o).Freeze()),
         "JobManagerTask",
         BindingAccess.Read);
     this.JobPreparationTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobPreparationTask, o => new JobPreparationTask(o).Freeze()),
         "JobPreparationTask",
         BindingAccess.Read);
     this.JobReleaseTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobReleaseTask, o => new JobReleaseTask(o).Freeze()),
         "JobReleaseTask",
         BindingAccess.Read);
     this.LastModifiedProperty = this.CreatePropertyAccessor(
         protocolObject.LastModified,
         "LastModified",
         BindingAccess.Read);
     this.MetadataProperty = this.CreatePropertyAccessor(
         MetadataItem.ConvertFromProtocolCollection(protocolObject.Metadata),
         "Metadata",
         BindingAccess.Read | BindingAccess.Write);
     this.OnAllTasksCompleteProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.OnAllTasksComplete, Common.OnAllTasksComplete>(protocolObject.OnAllTasksComplete),
         "OnAllTasksComplete",
         BindingAccess.Read | BindingAccess.Write);
     this.OnTaskFailureProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.OnTaskFailure, Common.OnTaskFailure>(protocolObject.OnTaskFailure),
         "OnTaskFailure",
         BindingAccess.Read);
     this.PoolInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.PoolInfo, o => new PoolInformation(o)),
         "PoolInformation",
         BindingAccess.Read | BindingAccess.Write);
     this.PreviousStateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.JobState, Common.JobState>(protocolObject.PreviousState),
         "PreviousState",
         BindingAccess.Read);
     this.PreviousStateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.PreviousStateTransitionTime,
         "PreviousStateTransitionTime",
         BindingAccess.Read);
     this.PriorityProperty = this.CreatePropertyAccessor(
         protocolObject.Priority,
         "Priority",
         BindingAccess.Read | BindingAccess.Write);
     this.StateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.JobState, Common.JobState>(protocolObject.State),
         "State",
         BindingAccess.Read);
     this.StateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.StateTransitionTime,
         "StateTransitionTime",
         BindingAccess.Read);
     this.StatisticsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Stats, o => new JobStatistics(o).Freeze()),
         "Statistics",
         BindingAccess.Read);
     this.UrlProperty = this.CreatePropertyAccessor(
         protocolObject.Url,
         "Url",
         BindingAccess.Read);
     this.UsesTaskDependenciesProperty = this.CreatePropertyAccessor(
         protocolObject.UsesTaskDependencies,
         "UsesTaskDependencies",
         BindingAccess.Read);
 }