Exemplo n.º 1
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.JobAddParameter ITransportObjectProvider <Models.JobAddParameter> .GetTransportObject()
        {
            Models.JobAddParameter result = new Models.JobAddParameter()
            {
                CommonEnvironmentSettings = UtilitiesInternal.ConvertToProtocolCollection(this.CommonEnvironmentSettings),
                Constraints          = UtilitiesInternal.CreateObjectWithNullCheck(this.Constraints, (o) => o.GetTransportObject()),
                DisplayName          = this.DisplayName,
                Id                   = this.Id,
                JobManagerTask       = UtilitiesInternal.CreateObjectWithNullCheck(this.JobManagerTask, (o) => o.GetTransportObject()),
                JobPreparationTask   = UtilitiesInternal.CreateObjectWithNullCheck(this.JobPreparationTask, (o) => o.GetTransportObject()),
                JobReleaseTask       = UtilitiesInternal.CreateObjectWithNullCheck(this.JobReleaseTask, (o) => o.GetTransportObject()),
                MaxParallelTasks     = this.MaxParallelTasks,
                Metadata             = UtilitiesInternal.ConvertToProtocolCollection(this.Metadata),
                NetworkConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.NetworkConfiguration, (o) => o.GetTransportObject()),
                OnAllTasksComplete   = UtilitiesInternal.MapNullableEnum <Common.OnAllTasksComplete, Models.OnAllTasksComplete>(this.OnAllTasksComplete),
                OnTaskFailure        = UtilitiesInternal.MapNullableEnum <Common.OnTaskFailure, Models.OnTaskFailure>(this.OnTaskFailure),
                PoolInfo             = UtilitiesInternal.CreateObjectWithNullCheck(this.PoolInformation, (o) => o.GetTransportObject()),
                Priority             = this.Priority,
                UsesTaskDependencies = this.UsesTaskDependencies,
            };

            return(result);
        }
Exemplo n.º 2
0
 public PropertyContainer(Models.ExitConditions protocolObject) : base(BindingState.Bound)
 {
     this.DefaultProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.DefaultProperty, o => new ExitOptions(o).Freeze()),
         nameof(Default),
         BindingAccess.Read);
     this.ExitCodeRangesProperty = this.CreatePropertyAccessor(
         ExitCodeRangeMapping.ConvertFromProtocolCollectionAndFreeze(protocolObject.ExitCodeRanges),
         nameof(ExitCodeRanges),
         BindingAccess.Read);
     this.ExitCodesProperty = this.CreatePropertyAccessor(
         ExitCodeMapping.ConvertFromProtocolCollectionAndFreeze(protocolObject.ExitCodes),
         nameof(ExitCodes),
         BindingAccess.Read);
     this.FileUploadErrorProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.FileUploadError, o => new ExitOptions(o).Freeze()),
         nameof(FileUploadError),
         BindingAccess.Read);
     this.PreProcessingErrorProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.PreProcessingError, o => new ExitOptions(o).Freeze()),
         nameof(PreProcessingError),
         BindingAccess.Read);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.JobManagerTask ITransportObjectProvider <Models.JobManagerTask> .GetTransportObject()
        {
            Models.JobManagerTask result = new Models.JobManagerTask()
            {
                AllowLowPriorityNode         = this.AllowLowPriorityNode,
                ApplicationPackageReferences = UtilitiesInternal.ConvertToProtocolCollection(this.ApplicationPackageReferences),
                AuthenticationTokenSettings  = UtilitiesInternal.CreateObjectWithNullCheck(this.AuthenticationTokenSettings, (o) => o.GetTransportObject()),
                CommandLine         = this.CommandLine,
                Constraints         = UtilitiesInternal.CreateObjectWithNullCheck(this.Constraints, (o) => o.GetTransportObject()),
                ContainerSettings   = UtilitiesInternal.CreateObjectWithNullCheck(this.ContainerSettings, (o) => o.GetTransportObject()),
                DisplayName         = this.DisplayName,
                EnvironmentSettings = UtilitiesInternal.ConvertToProtocolCollection(this.EnvironmentSettings),
                Id = this.Id,
                KillJobOnCompletion = this.KillJobOnCompletion,
                OutputFiles         = UtilitiesInternal.ConvertToProtocolCollection(this.OutputFiles),
                RequiredSlots       = this.RequiredSlots,
                ResourceFiles       = UtilitiesInternal.ConvertToProtocolCollection(this.ResourceFiles),
                RunExclusive        = this.RunExclusive,
                UserIdentity        = UtilitiesInternal.CreateObjectWithNullCheck(this.UserIdentity, (o) => o.GetTransportObject()),
            };

            return(result);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.TaskAddParameter ITransportObjectProvider <Models.TaskAddParameter> .GetTransportObject()
        {
            Models.TaskAddParameter result = new Models.TaskAddParameter()
            {
                AffinityInfo = UtilitiesInternal.CreateObjectWithNullCheck(this.AffinityInformation, (o) => o.GetTransportObject()),
                ApplicationPackageReferences = UtilitiesInternal.ConvertToProtocolCollection(this.ApplicationPackageReferences),
                AuthenticationTokenSettings  = UtilitiesInternal.CreateObjectWithNullCheck(this.AuthenticationTokenSettings, (o) => o.GetTransportObject()),
                CommandLine         = this.CommandLine,
                Constraints         = UtilitiesInternal.CreateObjectWithNullCheck(this.Constraints, (o) => o.GetTransportObject()),
                ContainerSettings   = UtilitiesInternal.CreateObjectWithNullCheck(this.ContainerSettings, (o) => o.GetTransportObject()),
                DependsOn           = UtilitiesInternal.CreateObjectWithNullCheck(this.DependsOn, (o) => o.GetTransportObject()),
                DisplayName         = this.DisplayName,
                EnvironmentSettings = UtilitiesInternal.ConvertToProtocolCollection(this.EnvironmentSettings),
                ExitConditions      = UtilitiesInternal.CreateObjectWithNullCheck(this.ExitConditions, (o) => o.GetTransportObject()),
                Id = this.Id,
                MultiInstanceSettings = UtilitiesInternal.CreateObjectWithNullCheck(this.MultiInstanceSettings, (o) => o.GetTransportObject()),
                OutputFiles           = UtilitiesInternal.ConvertToProtocolCollection(this.OutputFiles),
                ResourceFiles         = UtilitiesInternal.ConvertToProtocolCollection(this.ResourceFiles),
                UserIdentity          = UtilitiesInternal.CreateObjectWithNullCheck(this.UserIdentity, (o) => o.GetTransportObject()),
            };

            return(result);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Convert an enum of type CertificateVisibility to a List of Protocol.Models.CertificateVisibility.
        /// </summary>
        /// <param name='value'>
        /// The value to convert.
        /// </param>
        /// <returns>
        /// The enum value to convert into list format.
        /// </returns>
        internal static IList <Protocol.Models.CertificateVisibility?> CertificateVisibilityToList(Common.CertificateVisibility?value)
        {
            List <Protocol.Models.CertificateVisibility?> result = new List <Protocol.Models.CertificateVisibility?>();

            if (value.HasValue)
            {
                IList <Common.CertificateVisibility> enumValues = new List <Common.CertificateVisibility>(
                    (Common.CertificateVisibility[])Enum.GetValues(typeof(Common.CertificateVisibility)));

                enumValues.Remove(Common.CertificateVisibility.None); //None is an artifact of the OM so skip it

                foreach (Common.CertificateVisibility enumValue in enumValues)
                {
                    if (value.Value.HasFlag(enumValue))
                    {
                        Protocol.Models.CertificateVisibility protoEnumValue = UtilitiesInternal.MapEnum <Common.CertificateVisibility, Protocol.Models.CertificateVisibility>(enumValue);
                        result.Add(protoEnumValue);
                    }
                }
            }

            return(result);
        }
Exemplo n.º 6
0
 public PropertyContainer(Models.UserAccount protocolObject) : base(BindingState.Bound)
 {
     this.ElevationLevelProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.ElevationLevel, Common.ElevationLevel>(protocolObject.ElevationLevel),
         nameof(ElevationLevel),
         BindingAccess.Read);
     this.LinuxUserConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.LinuxUserConfiguration, o => new LinuxUserConfiguration(o).Freeze()),
         nameof(LinuxUserConfiguration),
         BindingAccess.Read);
     this.NameProperty = this.CreatePropertyAccessor(
         protocolObject.Name,
         nameof(Name),
         BindingAccess.Read);
     this.PasswordProperty = this.CreatePropertyAccessor(
         protocolObject.Password,
         nameof(Password),
         BindingAccess.Read);
     this.WindowsUserConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.WindowsUserConfiguration, o => new WindowsUserConfiguration(o).Freeze()),
         nameof(WindowsUserConfiguration),
         BindingAccess.Read);
 }
Exemplo n.º 7
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);
 }
Exemplo n.º 8
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.º 9
0
 internal UserIdentity(Models.UserIdentity protocolObject)
 {
     this.AutoUser = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AutoUser, o => new AutoUserSpecification(o).Freeze());
     this.UserName = protocolObject.UserName;
 }
Exemplo n.º 10
0
 internal TaskDependencies(Models.TaskDependencies protocolObject)
 {
     this.TaskIdRanges = TaskIdRange.ConvertFromProtocolCollectionReadOnly(protocolObject.TaskIdRanges);
     this.TaskIds      = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.TaskIds, o => o.ToList().AsReadOnly());
 }
Exemplo n.º 11
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.º 12
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.º 13
0
 internal TaskSchedulingPolicy(Models.TaskSchedulingPolicy protocolObject)
 {
     this.ComputeNodeFillType = UtilitiesInternal.MapEnum <Models.ComputeNodeFillType, Common.ComputeNodeFillType>(protocolObject.NodeFillType);
 }
 internal JobScheduleExecutionInformation(Models.JobScheduleExecutionInformation protocolObject)
 {
     this.endTime     = protocolObject.EndTime;
     this.nextRunTime = protocolObject.NextRunTime;
     this.recentJob   = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.RecentJob, o => new RecentJob(o).Freeze());
 }
Exemplo n.º 15
0
 internal DiskEncryptionConfiguration(Models.DiskEncryptionConfiguration protocolObject)
 {
     this.Targets = UtilitiesInternal.ConvertEnumCollection <Models.DiskEncryptionTarget, Common.DiskEncryptionTarget>(protocolObject.Targets);
 }
Exemplo n.º 16
0
 internal AutoUserSpecification(Models.AutoUserSpecification protocolObject)
 {
     this.ElevationLevel = UtilitiesInternal.MapNullableEnum <Models.ElevationLevel, Common.ElevationLevel>(protocolObject.ElevationLevel);
     this.Scope          = UtilitiesInternal.MapNullableEnum <Models.AutoUserScope, Common.AutoUserScope>(protocolObject.Scope);
 }
Exemplo n.º 17
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.º 18
0
 internal NodePlacementConfiguration(Models.NodePlacementConfiguration protocolObject)
 {
     this.Policy = UtilitiesInternal.MapNullableEnum <Models.NodePlacementPolicyType, Common.NodePlacementPolicyType>(protocolObject.Policy);
 }
Exemplo n.º 19
0
 public PropertyContainer(Models.JobManagerTask protocolObject) : base(BindingState.Bound)
 {
     this.AllowLowPriorityNodeProperty = this.CreatePropertyAccessor(
         protocolObject.AllowLowPriorityNode,
         nameof(AllowLowPriorityNode),
         BindingAccess.Read | BindingAccess.Write);
     this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor(
         ApplicationPackageReference.ConvertFromProtocolCollection(protocolObject.ApplicationPackageReferences),
         nameof(ApplicationPackageReferences),
         BindingAccess.Read | BindingAccess.Write);
     this.AuthenticationTokenSettingsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AuthenticationTokenSettings, o => new AuthenticationTokenSettings(o)),
         nameof(AuthenticationTokenSettings),
         BindingAccess.Read | BindingAccess.Write);
     this.CommandLineProperty = this.CreatePropertyAccessor(
         protocolObject.CommandLine,
         nameof(CommandLine),
         BindingAccess.Read | BindingAccess.Write);
     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.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         nameof(DisplayName),
         BindingAccess.Read | BindingAccess.Write);
     this.EnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollection(protocolObject.EnvironmentSettings),
         nameof(EnvironmentSettings),
         BindingAccess.Read | BindingAccess.Write);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         nameof(Id),
         BindingAccess.Read | BindingAccess.Write);
     this.KillJobOnCompletionProperty = this.CreatePropertyAccessor(
         protocolObject.KillJobOnCompletion,
         nameof(KillJobOnCompletion),
         BindingAccess.Read | BindingAccess.Write);
     this.OutputFilesProperty = this.CreatePropertyAccessor(
         OutputFile.ConvertFromProtocolCollection(protocolObject.OutputFiles),
         nameof(OutputFiles),
         BindingAccess.Read | BindingAccess.Write);
     this.RequiredSlotsProperty = this.CreatePropertyAccessor(
         protocolObject.RequiredSlots,
         nameof(RequiredSlots),
         BindingAccess.Read);
     this.ResourceFilesProperty = this.CreatePropertyAccessor(
         ResourceFile.ConvertFromProtocolCollection(protocolObject.ResourceFiles),
         nameof(ResourceFiles),
         BindingAccess.Read | BindingAccess.Write);
     this.RunExclusiveProperty = this.CreatePropertyAccessor(
         protocolObject.RunExclusive,
         nameof(RunExclusive),
         BindingAccess.Read | BindingAccess.Write);
     this.UserIdentityProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.UserIdentity, o => new UserIdentity(o)),
         nameof(UserIdentity),
         BindingAccess.Read | BindingAccess.Write);
 }
Exemplo n.º 20
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.º 21
0
 internal OutputFileUploadOptions(Models.OutputFileUploadOptions protocolObject)
 {
     this.UploadCondition = UtilitiesInternal.MapEnum <Models.OutputFileUploadCondition, Common.OutputFileUploadCondition>(protocolObject.UploadCondition);
 }
Exemplo n.º 22
0
 public PropertyContainer(Models.JobSpecification protocolObject) : base(BindingState.Bound)
 {
     this.AllowTaskPreemptionProperty = this.CreatePropertyAccessor(
         protocolObject.AllowTaskPreemption,
         nameof(AllowTaskPreemption),
         BindingAccess.Read | BindingAccess.Write);
     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.º 23
0
 internal NodeAgentSku(Models.NodeAgentSku protocolObject)
 {
     this.id     = protocolObject.Id;
     this.osType = UtilitiesInternal.MapNullableEnum <Models.OSType, Common.OSType>(protocolObject.OsType);
     this.verifiedImageReferences = ImageReference.ConvertFromProtocolCollectionReadOnly(protocolObject.VerifiedImageReferences);
 }
Exemplo n.º 24
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.º 25
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);
 }
Exemplo n.º 26
0
        public async System.Threading.Tasks.Task AddTasksAsync(IEnumerable <CloudTask> tasksToAdd, TimeSpan?timeout = null)
        {
            //Ensure that this object has not already been used
            int original = Interlocked.CompareExchange(ref this._hasRun, HasRun, HasNotRun);

            if (original != HasNotRun)
            {
                throw new RunOnceException(string.Format(BatchErrorMessages.CanOnlyBeRunOnceFailure, this.GetType().Name));
            }

            //Determine what time to timeout at
            if (timeout != null)
            {
                this._timeToTimeoutAt = DateTime.UtcNow + timeout.Value;
            }
            else
            {
                //TODO: We set this to max value -- maybe in the future we can be a bit more friendly to customers and not run forever
                this._timeToTimeoutAt = DateTime.MaxValue;
            }

            //
            // Collect the tasks and add them to the pending queue
            //
            //TODO: There is a tension between allowing lazy enumeration of tasksToAdd and performing any validation on tasksToAdd early in the addition process
            //TODO: For now (since most customer implementations are not going to write their own lazy collection) we go ahead and perform
            //TODO: some input validation...

            //
            // Perform some basic input validation
            //
            //TODO: Check no duplicate task names?
            //TODO: Check the tasks are not children of some other object already

            //Enumerate the supplied collection asynchronously if required
            tasksToAdd = await UtilitiesInternal.EnumerateIfNeededAsync(tasksToAdd, this._parallelOptions.CancellationToken).ConfigureAwait(false);

            //TODO: For now perform a copy into a queue -- in the future consider honoring lazy loading and do this later
            foreach (CloudTask cloudTask in tasksToAdd)
            {
                if (cloudTask == null)
                {
                    throw new ArgumentNullException("tasksToAdd", BatchErrorMessages.CollectionMustNotContainNull);
                }

                if (cloudTask.BindingState == BindingState.Bound)
                {
                    throw UtilitiesInternal.OperationForbiddenOnBoundObjects;
                }

                this._remainingTasksToAdd.Enqueue(new TrackedCloudTask(this._jobId, this._jobOperations, cloudTask));
            }

            //
            // Fire the requests
            //
            while (!this.IsWorkflowDone())
            {
                //Wait for an open request "slot" (an existing request to complete) if:
                //1. We have no free request slots
                //2. We have no more tasks to add and there are ongoing pending operations which could result in task add retries (causing us to get more tasks to add)
                bool noFreeSlots = this._pendingAsyncOperations.Count >= this._parallelOptions.MaxDegreeOfParallelism;
                bool noTasksToAddButSomePendingLegsRemain = this._remainingTasksToAdd.Count == 0 && this._pendingAsyncOperations.Count > 0;
                if (noFreeSlots || noTasksToAddButSomePendingLegsRemain)
                {
                    await this.ProcessPendingOperationResults().ConfigureAwait(continueOnCapturedContext: false);
                }

                //If we get here, we are starting a single new leg.  Another iteration of this loop will get to any tasks which do not fit in this leg.

                //Add any tasks (up to max count in 1 request) which are remaining since we have an open parallel slot
                Dictionary <string, TrackedCloudTask> nameToTaskMapping = new Dictionary <string, TrackedCloudTask>();

                //Attempt to take some items from the set of tasks remaining to be added and prepare it to be added
                TrackedCloudTask taskToAdd;
                int tmpMaxTasks = this._maxTasks;
                while (nameToTaskMapping.Count < tmpMaxTasks && this._remainingTasksToAdd.TryDequeue(out taskToAdd))
                {
                    nameToTaskMapping.Add(taskToAdd.Task.Id, taskToAdd);
                }

                if (nameToTaskMapping.Count > 0)
                {
                    //Start the async operation to stage the files (if required) and issue the protocol add task request
                    Task asyncTask = this.StageFilesAndAddTasks(
                        nameToTaskMapping,
                        null);

                    //Add the request to the operation tracker
                    this._pendingAsyncOperations.Add(asyncTask);
                }
            }

            //If we reach here, we have succeeded - yay!
        }
 internal TaskContainerSettings(Models.TaskContainerSettings protocolObject)
 {
     this.ContainerRunOptions = protocolObject.ContainerRunOptions;
     this.ImageName           = protocolObject.ImageName;
     this.Registry            = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Registry, o => new ContainerRegistry(o).Freeze());
 }
Exemplo n.º 28
0
 internal BatchError(Models.BatchError protocolObject)
 {
     this.code    = protocolObject.Code;
     this.message = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Message, o => new ErrorMessage(o).Freeze());
     this.values  = BatchErrorDetail.ConvertFromProtocolCollectionReadOnly(protocolObject.Values);
 }
Exemplo n.º 29
0
 public PropertyContainer(Models.ComputeNode protocolObject) : base(BindingState.Bound)
 {
     this.AffinityIdProperty = this.CreatePropertyAccessor(
         protocolObject.AffinityId,
         nameof(AffinityId),
         BindingAccess.Read);
     this.AllocationTimeProperty = this.CreatePropertyAccessor(
         protocolObject.AllocationTime,
         nameof(AllocationTime),
         BindingAccess.Read);
     this.CertificateReferencesProperty = this.CreatePropertyAccessor(
         CertificateReference.ConvertFromProtocolCollectionReadOnly(protocolObject.CertificateReferences),
         nameof(CertificateReferences),
         BindingAccess.Read);
     this.EndpointConfigurationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.EndpointConfiguration, o => new ComputeNodeEndpointConfiguration(o).Freeze()),
         nameof(EndpointConfiguration),
         BindingAccess.Read);
     this.ErrorsProperty = this.CreatePropertyAccessor(
         ComputeNodeError.ConvertFromProtocolCollectionReadOnly(protocolObject.Errors),
         nameof(Errors),
         BindingAccess.Read);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         nameof(Id),
         BindingAccess.Read);
     this.IPAddressProperty = this.CreatePropertyAccessor(
         protocolObject.IpAddress,
         nameof(IPAddress),
         BindingAccess.Read);
     this.IsDedicatedProperty = this.CreatePropertyAccessor(
         protocolObject.IsDedicated,
         nameof(IsDedicated),
         BindingAccess.Read);
     this.LastBootTimeProperty = this.CreatePropertyAccessor(
         protocolObject.LastBootTime,
         nameof(LastBootTime),
         BindingAccess.Read);
     this.NodeAgentInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NodeAgentInfo, o => new NodeAgentInformation(o).Freeze()),
         nameof(NodeAgentInformation),
         BindingAccess.Read);
     this.RecentTasksProperty = this.CreatePropertyAccessor(
         TaskInformation.ConvertFromProtocolCollectionReadOnly(protocolObject.RecentTasks),
         nameof(RecentTasks),
         BindingAccess.Read);
     this.RunningTasksCountProperty = this.CreatePropertyAccessor(
         protocolObject.RunningTasksCount,
         nameof(RunningTasksCount),
         BindingAccess.Read);
     this.RunningTaskSlotsCountProperty = this.CreatePropertyAccessor(
         protocolObject.RunningTaskSlotsCount,
         nameof(RunningTaskSlotsCount),
         BindingAccess.Read);
     this.SchedulingStateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.SchedulingState, Common.SchedulingState>(protocolObject.SchedulingState),
         nameof(SchedulingState),
         BindingAccess.Read);
     this.StartTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTask, o => new StartTask(o).Freeze()),
         nameof(StartTask),
         BindingAccess.Read);
     this.StartTaskInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTaskInfo, o => new StartTaskInformation(o).Freeze()),
         nameof(StartTaskInformation),
         BindingAccess.Read);
     this.StateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum <Models.ComputeNodeState, Common.ComputeNodeState>(protocolObject.State),
         nameof(State),
         BindingAccess.Read);
     this.StateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.StateTransitionTime,
         nameof(StateTransitionTime),
         BindingAccess.Read);
     this.TotalTasksRunProperty = this.CreatePropertyAccessor(
         protocolObject.TotalTasksRun,
         nameof(TotalTasksRun),
         BindingAccess.Read);
     this.TotalTasksSucceededProperty = this.CreatePropertyAccessor(
         protocolObject.TotalTasksSucceeded,
         nameof(TotalTasksSucceeded),
         BindingAccess.Read);
     this.UrlProperty = this.CreatePropertyAccessor(
         protocolObject.Url,
         nameof(Url),
         BindingAccess.Read);
     this.VirtualMachineSizeProperty = this.CreatePropertyAccessor(
         protocolObject.VmSize,
         nameof(VirtualMachineSize),
         BindingAccess.Read);
 }
Exemplo n.º 30
0
 internal AutoScaleRun(Models.AutoScaleRun protocolObject)
 {
     this.error     = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Error, o => new AutoScaleRunError(o).Freeze());
     this.results   = protocolObject.Results;
     this.timestamp = protocolObject.Timestamp;
 }