public PropertyContainer(Models.MultiInstanceSettings protocolObject) : base(BindingState.Bound)
 {
     this.CommonResourceFilesProperty = this.CreatePropertyAccessor(
         ResourceFile.ConvertFromProtocolCollectionAndFreeze(protocolObject.CommonResourceFiles),
         nameof(CommonResourceFiles),
         BindingAccess.Read);
     this.CoordinationCommandLineProperty = this.CreatePropertyAccessor(
         protocolObject.CoordinationCommandLine,
         nameof(CoordinationCommandLine),
         BindingAccess.Read);
     this.NumberOfInstancesProperty = this.CreatePropertyAccessor(
         protocolObject.NumberOfInstances,
         nameof(NumberOfInstances),
         BindingAccess.Read);
 }
예제 #2
0
파일: CloudTask.cs 프로젝트: QITIE/ADLSTool
 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);
 }
예제 #3
0
 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);
 }