Beispiel #1
0
 public PropertyContainer(Models.CloudTask protocolObject) : base(BindingState.Bound)
 {
     this.AffinityInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AffinityInfo, o => new AffinityInformation(o).Freeze()),
         "AffinityInformation",
         BindingAccess.Read);
     this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor(
         ApplicationPackageReference.ConvertFromProtocolCollectionAndFreeze(protocolObject.ApplicationPackageReferences),
         "ApplicationPackageReferences",
         BindingAccess.Read);
     this.CommandLineProperty = this.CreatePropertyAccessor(
         protocolObject.CommandLine,
         "CommandLine",
         BindingAccess.Read);
     this.ComputeNodeInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NodeInfo, o => new ComputeNodeInformation(o).Freeze()),
         "ComputeNodeInformation",
         BindingAccess.Read);
     this.ConstraintsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Constraints, o => new TaskConstraints(o)),
         "Constraints",
         BindingAccess.Read | BindingAccess.Write);
     this.CreationTimeProperty = this.CreatePropertyAccessor(
         protocolObject.CreationTime,
         "CreationTime",
         BindingAccess.Read);
     this.DependsOnProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.DependsOn, o => new TaskDependencies(o).Freeze()),
         "DependsOn",
         BindingAccess.Read);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         "DisplayName",
         BindingAccess.Read);
     this.EnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollectionAndFreeze(protocolObject.EnvironmentSettings),
         "EnvironmentSettings",
         BindingAccess.Read);
     this.ETagProperty = this.CreatePropertyAccessor(
         protocolObject.ETag,
         "ETag",
         BindingAccess.Read);
     this.ExecutionInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ExecutionInfo, o => new TaskExecutionInformation(o).Freeze()),
         "ExecutionInformation",
         BindingAccess.Read);
     this.ExitConditionsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ExitConditions, o => new ExitConditions(o).Freeze()),
         "ExitConditions",
         BindingAccess.Read);
     this.FilesToStageProperty = this.CreatePropertyAccessor <IList <IFileStagingProvider> >(
         "FilesToStage",
         BindingAccess.None);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         "Id",
         BindingAccess.Read);
     this.LastModifiedProperty = this.CreatePropertyAccessor(
         protocolObject.LastModified,
         "LastModified",
         BindingAccess.Read);
     this.MultiInstanceSettingsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.MultiInstanceSettings, o => new MultiInstanceSettings(o).Freeze()),
         "MultiInstanceSettings",
         BindingAccess.Read);
     this.PreviousStateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.TaskState, Common.TaskState>(protocolObject.PreviousState),
         "PreviousState",
         BindingAccess.Read);
     this.PreviousStateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.PreviousStateTransitionTime,
         "PreviousStateTransitionTime",
         BindingAccess.Read);
     this.ResourceFilesProperty = this.CreatePropertyAccessor(
         ResourceFile.ConvertFromProtocolCollectionAndFreeze(protocolObject.ResourceFiles),
         "ResourceFiles",
         BindingAccess.Read);
     this.RunElevatedProperty = this.CreatePropertyAccessor(
         protocolObject.RunElevated,
         "RunElevated",
         BindingAccess.Read);
     this.StateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.TaskState, Common.TaskState>(protocolObject.State),
         "State",
         BindingAccess.Read);
     this.StateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.StateTransitionTime,
         "StateTransitionTime",
         BindingAccess.Read);
     this.StatisticsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Stats, o => new TaskStatistics(o).Freeze()),
         "Statistics",
         BindingAccess.Read);
     this.UrlProperty = this.CreatePropertyAccessor(
         protocolObject.Url,
         "Url",
         BindingAccess.Read);
 }
 public PropertyContainer(Models.CloudTask protocolObject) : base(BindingState.Bound)
 {
     this.AffinityInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AffinityInfo, o => new AffinityInformation(o).Freeze()),
         nameof(AffinityInformation),
         BindingAccess.Read);
     this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor(
         ApplicationPackageReference.ConvertFromProtocolCollectionAndFreeze(protocolObject.ApplicationPackageReferences),
         nameof(ApplicationPackageReferences),
         BindingAccess.Read);
     this.AuthenticationTokenSettingsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AuthenticationTokenSettings, o => new AuthenticationTokenSettings(o).Freeze()),
         nameof(AuthenticationTokenSettings),
         BindingAccess.Read);
     this.CommandLineProperty = this.CreatePropertyAccessor(
         protocolObject.CommandLine,
         nameof(CommandLine),
         BindingAccess.Read);
     this.ComputeNodeInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NodeInfo, o => new ComputeNodeInformation(o).Freeze()),
         nameof(ComputeNodeInformation),
         BindingAccess.Read);
     this.ConstraintsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Constraints, o => new TaskConstraints(o)),
         nameof(Constraints),
         BindingAccess.Read | BindingAccess.Write);
     this.ContainerSettingsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerSettings, o => new TaskContainerSettings(o).Freeze()),
         nameof(ContainerSettings),
         BindingAccess.Read);
     this.CreationTimeProperty = this.CreatePropertyAccessor(
         protocolObject.CreationTime,
         nameof(CreationTime),
         BindingAccess.Read);
     this.DependsOnProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.DependsOn, o => new TaskDependencies(o).Freeze()),
         nameof(DependsOn),
         BindingAccess.Read);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         nameof(DisplayName),
         BindingAccess.Read);
     this.EnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollectionAndFreeze(protocolObject.EnvironmentSettings),
         nameof(EnvironmentSettings),
         BindingAccess.Read);
     this.ETagProperty = this.CreatePropertyAccessor(
         protocolObject.ETag,
         nameof(ETag),
         BindingAccess.Read);
     this.ExecutionInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ExecutionInfo, o => new TaskExecutionInformation(o).Freeze()),
         nameof(ExecutionInformation),
         BindingAccess.Read);
     this.ExitConditionsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ExitConditions, o => new ExitConditions(o).Freeze()),
         nameof(ExitConditions),
         BindingAccess.Read);
     this.FilesToStageProperty = this.CreatePropertyAccessor <IList <IFileStagingProvider> >(
         nameof(FilesToStage),
         BindingAccess.None);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         nameof(Id),
         BindingAccess.Read);
     this.LastModifiedProperty = this.CreatePropertyAccessor(
         protocolObject.LastModified,
         nameof(LastModified),
         BindingAccess.Read);
     this.MultiInstanceSettingsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.MultiInstanceSettings, o => new MultiInstanceSettings(o).Freeze()),
         nameof(MultiInstanceSettings),
         BindingAccess.Read);
     this.OutputFilesProperty = this.CreatePropertyAccessor(
         OutputFile.ConvertFromProtocolCollectionAndFreeze(protocolObject.OutputFiles),
         nameof(OutputFiles),
         BindingAccess.Read);
     this.PreviousStateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.TaskState, Common.TaskState>(protocolObject.PreviousState),
         nameof(PreviousState),
         BindingAccess.Read);
     this.PreviousStateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.PreviousStateTransitionTime,
         nameof(PreviousStateTransitionTime),
         BindingAccess.Read);
     this.ResourceFilesProperty = this.CreatePropertyAccessor(
         ResourceFile.ConvertFromProtocolCollectionAndFreeze(protocolObject.ResourceFiles),
         nameof(ResourceFiles),
         BindingAccess.Read);
     this.StateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.TaskState, Common.TaskState>(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 TaskStatistics(o).Freeze()),
         nameof(Statistics),
         BindingAccess.Read);
     this.UrlProperty = this.CreatePropertyAccessor(
         protocolObject.Url,
         nameof(Url),
         BindingAccess.Read);
     this.UserIdentityProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.UserIdentity, o => new UserIdentity(o).Freeze()),
         nameof(UserIdentity),
         BindingAccess.Read);
 }
Beispiel #3
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);
 }
Beispiel #4
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);
 }