コード例 #1
0
        /// <summary>
        /// Converts a collection of protocol layer objects to object layer collection objects, with each object marked readonly
        /// and returned as a readonly collection.
        /// </summary>
        internal static IReadOnlyList <TaskIdRange> ConvertFromProtocolCollectionReadOnly(IEnumerable <Models.TaskIdRange> protoCollection)
        {
            IReadOnlyList <TaskIdRange> converted =
                UtilitiesInternal.CreateObjectWithNullCheck(
                    UtilitiesInternal.CollectionToNonThreadSafeCollection(
                        items: protoCollection,
                        objectCreationFunc: o => new TaskIdRange(o).Freeze()), o => o.AsReadOnly());

            return(converted);
        }
コード例 #2
0
        /// <summary>
        /// Converts a collection of protocol layer objects to object layer collection objects, in a frozen state.
        /// </summary>
        internal static IList <TaskIdRange> ConvertFromProtocolCollectionAndFreeze(IEnumerable <Models.TaskIdRange> protoCollection)
        {
            ConcurrentChangeTrackedModifiableList <TaskIdRange> converted = UtilitiesInternal.CollectionToThreadSafeCollectionIModifiable(
                items: protoCollection,
                objectCreationFunc: o => new TaskIdRange(o).Freeze());

            converted = UtilitiesInternal.CreateObjectWithNullCheck(converted, o => o.Freeze());

            return(converted);
        }
コード例 #3
0
 internal JobReleaseTaskExecutionInformation(Models.JobReleaseTaskExecutionInformation protocolObject)
 {
     this.endTime              = protocolObject.EndTime;
     this.exitCode             = protocolObject.ExitCode;
     this.schedulingError      = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.SchedulingError, o => new TaskSchedulingError(o).Freeze());
     this.startTime            = protocolObject.StartTime;
     this.state                = UtilitiesInternal.MapEnum <Models.JobReleaseTaskState, Common.JobReleaseTaskState>(protocolObject.State);
     this.taskRootDirectory    = protocolObject.TaskRootDirectory;
     this.taskRootDirectoryUrl = protocolObject.TaskRootDirectoryUrl;
 }
コード例 #4
0
 public PropertyContainer(Models.JobSpecification protocolObject) : base(BindingState.Bound)
 {
     this.CommonEnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollection(protocolObject.CommonEnvironmentSettings),
         nameof(CommonEnvironmentSettings),
         BindingAccess.Read | BindingAccess.Write);
     this.ConstraintsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Constraints, o => new JobConstraints(o)),
         nameof(Constraints),
         BindingAccess.Read | BindingAccess.Write);
     this.DisplayNameProperty = this.CreatePropertyAccessor(
         protocolObject.DisplayName,
         nameof(DisplayName),
         BindingAccess.Read | BindingAccess.Write);
     this.JobManagerTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobManagerTask, o => new JobManagerTask(o)),
         nameof(JobManagerTask),
         BindingAccess.Read | BindingAccess.Write);
     this.JobPreparationTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobPreparationTask, o => new JobPreparationTask(o)),
         nameof(JobPreparationTask),
         BindingAccess.Read | BindingAccess.Write);
     this.JobReleaseTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.JobReleaseTask, o => new JobReleaseTask(o)),
         nameof(JobReleaseTask),
         BindingAccess.Read | BindingAccess.Write);
     this.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);
 }
コード例 #5
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.OutputFile ITransportObjectProvider <Models.OutputFile> .GetTransportObject()
        {
            Models.OutputFile result = new Models.OutputFile()
            {
                Destination   = UtilitiesInternal.CreateObjectWithNullCheck(this.Destination, (o) => o.GetTransportObject()),
                FilePattern   = this.FilePattern,
                UploadOptions = UtilitiesInternal.CreateObjectWithNullCheck(this.UploadOptions, (o) => o.GetTransportObject()),
            };

            return(result);
        }
コード例 #6
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.NetworkConfiguration ITransportObjectProvider <Models.NetworkConfiguration> .GetTransportObject()
        {
            Models.NetworkConfiguration result = new Models.NetworkConfiguration()
            {
                DynamicVNetAssignmentScope = UtilitiesInternal.MapNullableEnum <Common.DynamicVNetAssignmentScope, Models.DynamicVNetAssignmentScope>(this.DynamicVNetAssignmentScope),
                EndpointConfiguration      = UtilitiesInternal.CreateObjectWithNullCheck(this.EndpointConfiguration, (o) => o.GetTransportObject()),
                SubnetId = this.SubnetId,
            };

            return(result);
        }
コード例 #7
0
 internal TaskExecutionInformation(Models.TaskExecutionInformation protocolObject)
 {
     this.endTime         = protocolObject.EndTime;
     this.exitCode        = protocolObject.ExitCode;
     this.lastRequeueTime = protocolObject.LastRequeueTime;
     this.lastRetryTime   = protocolObject.LastRetryTime;
     this.requeueCount    = protocolObject.RequeueCount;
     this.retryCount      = protocolObject.RetryCount;
     this.schedulingError = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.SchedulingError, o => new TaskSchedulingError(o).Freeze());
     this.startTime       = protocolObject.StartTime;
 }
コード例 #8
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.TaskContainerSettings ITransportObjectProvider <Models.TaskContainerSettings> .GetTransportObject()
        {
            Models.TaskContainerSettings result = new Models.TaskContainerSettings()
            {
                ContainerRunOptions = this.ContainerRunOptions,
                ImageName           = this.ImageName,
                Registry            = UtilitiesInternal.CreateObjectWithNullCheck(this.Registry, (o) => o.GetTransportObject()),
            };

            return(result);
        }
コード例 #9
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.NodeVMExtension ITransportObjectProvider <Models.NodeVMExtension> .GetTransportObject()
        {
            Models.NodeVMExtension result = new Models.NodeVMExtension()
            {
                InstanceView      = UtilitiesInternal.CreateObjectWithNullCheck(this.InstanceView, (o) => o.GetTransportObject()),
                ProvisioningState = this.ProvisioningState,
                VmExtension       = UtilitiesInternal.CreateObjectWithNullCheck(this.VmExtension, (o) => o.GetTransportObject()),
            };

            return(result);
        }
コード例 #10
0
 public PropertyContainer(Models.PoolInformation protocolObject) : base(BindingState.Bound)
 {
     this.AutoPoolSpecificationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AutoPoolSpecification, o => new AutoPoolSpecification(o)),
         "AutoPoolSpecification",
         BindingAccess.Read | BindingAccess.Write);
     this.PoolIdProperty = this.CreatePropertyAccessor(
         protocolObject.PoolId,
         "PoolId",
         BindingAccess.Read | BindingAccess.Write);
 }
コード例 #11
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.OutputFileBlobContainerDestination ITransportObjectProvider <Models.OutputFileBlobContainerDestination> .GetTransportObject()
        {
            Models.OutputFileBlobContainerDestination result = new Models.OutputFileBlobContainerDestination()
            {
                ContainerUrl      = this.ContainerUrl,
                IdentityReference = UtilitiesInternal.CreateObjectWithNullCheck(this.IdentityReference, (o) => o.GetTransportObject()),
                Path = this.Path,
            };

            return(result);
        }
コード例 #12
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.ExitCodeRangeMapping ITransportObjectProvider <Models.ExitCodeRangeMapping> .GetTransportObject()
        {
            Models.ExitCodeRangeMapping result = new Models.ExitCodeRangeMapping()
            {
                End         = this.End,
                ExitOptions = UtilitiesInternal.CreateObjectWithNullCheck(this.ExitOptions, (o) => o.GetTransportObject()),
                Start       = this.Start,
            };

            return(result);
        }
コード例 #13
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.VirtualMachineConfiguration ITransportObjectProvider <Models.VirtualMachineConfiguration> .GetTransportObject()
        {
            Models.VirtualMachineConfiguration result = new Models.VirtualMachineConfiguration()
            {
                ImageReference       = UtilitiesInternal.CreateObjectWithNullCheck(this.ImageReference, (o) => o.GetTransportObject()),
                NodeAgentSKUId       = this.NodeAgentSkuId,
                WindowsConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.WindowsConfiguration, (o) => o.GetTransportObject()),
            };

            return(result);
        }
コード例 #14
0
 internal StartTaskInformation(Models.StartTaskInformation protocolObject)
 {
     this.ContainerInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerInfo, o => new TaskContainerExecutionInformation(o).Freeze());
     this.EndTime            = protocolObject.EndTime;
     this.ExitCode           = protocolObject.ExitCode;
     this.FailureInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.FailureInfo, o => new TaskFailureInformation(o).Freeze());
     this.LastRetryTime      = protocolObject.LastRetryTime;
     this.Result             = UtilitiesInternal.MapNullableEnum <Models.TaskExecutionResult, Common.TaskExecutionResult>(protocolObject.Result);
     this.RetryCount         = protocolObject.RetryCount;
     this.StartTime          = protocolObject.StartTime;
     this.State = UtilitiesInternal.MapEnum <Models.StartTaskState, Common.StartTaskState>(protocolObject.State);
 }
コード例 #15
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.NetworkSecurityGroupRule ITransportObjectProvider <Models.NetworkSecurityGroupRule> .GetTransportObject()
        {
            Models.NetworkSecurityGroupRule result = new Models.NetworkSecurityGroupRule()
            {
                Access              = UtilitiesInternal.MapEnum <Common.NetworkSecurityGroupRuleAccess, Models.NetworkSecurityGroupRuleAccess>(this.Access),
                Priority            = this.Priority,
                SourceAddressPrefix = this.SourceAddressPrefix,
                SourcePortRanges    = UtilitiesInternal.CreateObjectWithNullCheck(this.SourcePortRanges, o => o.ToList()),
            };

            return(result);
        }
コード例 #16
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.MountConfiguration ITransportObjectProvider <Models.MountConfiguration> .GetTransportObject()
        {
            Models.MountConfiguration result = new Models.MountConfiguration()
            {
                AzureBlobFileSystemConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.AzureBlobFileSystemConfiguration, (o) => o.GetTransportObject()),
                AzureFileShareConfiguration      = UtilitiesInternal.CreateObjectWithNullCheck(this.AzureFileShareConfiguration, (o) => o.GetTransportObject()),
                CifsMountConfiguration           = UtilitiesInternal.CreateObjectWithNullCheck(this.CifsMountConfiguration, (o) => o.GetTransportObject()),
                NfsMountConfiguration            = UtilitiesInternal.CreateObjectWithNullCheck(this.NfsMountConfiguration, (o) => o.GetTransportObject()),
            };

            return(result);
        }
コード例 #17
0
 internal JobReleaseTaskExecutionInformation(Models.JobReleaseTaskExecutionInformation protocolObject)
 {
     this.ContainerInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerInfo, o => new TaskContainerExecutionInformation(o).Freeze());
     this.EndTime            = protocolObject.EndTime;
     this.ExitCode           = protocolObject.ExitCode;
     this.FailureInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.FailureInfo, o => new TaskFailureInformation(o).Freeze());
     this.Result             = UtilitiesInternal.MapNullableEnum <Models.TaskExecutionResult, Common.TaskExecutionResult>(protocolObject.Result);
     this.StartTime          = protocolObject.StartTime;
     this.State                = UtilitiesInternal.MapEnum <Models.JobReleaseTaskState, Common.JobReleaseTaskState>(protocolObject.State);
     this.TaskRootDirectory    = protocolObject.TaskRootDirectory;
     this.TaskRootDirectoryUrl = protocolObject.TaskRootDirectoryUrl;
 }
コード例 #18
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.ContainerRegistry ITransportObjectProvider <Models.ContainerRegistry> .GetTransportObject()
        {
            Models.ContainerRegistry result = new Models.ContainerRegistry()
            {
                IdentityReference = UtilitiesInternal.CreateObjectWithNullCheck(this.IdentityReference, (o) => o.GetTransportObject()),
                Password          = this.Password,
                RegistryServer    = this.RegistryServer,
                UserName          = this.UserName,
            };

            return(result);
        }
コード例 #19
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.AutoPoolSpecification ITransportObjectProvider <Models.AutoPoolSpecification> .GetTransportObject()
        {
            Models.AutoPoolSpecification result = new Models.AutoPoolSpecification()
            {
                AutoPoolIdPrefix   = this.AutoPoolIdPrefix,
                KeepAlive          = this.KeepAlive,
                PoolLifetimeOption = UtilitiesInternal.MapEnum <Common.PoolLifetimeOption, Models.PoolLifetimeOption>(this.PoolLifetimeOption),
                Pool = UtilitiesInternal.CreateObjectWithNullCheck(this.PoolSpecification, (o) => o.GetTransportObject()),
            };

            return(result);
        }
コード例 #20
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.ExitConditions ITransportObjectProvider <Models.ExitConditions> .GetTransportObject()
        {
            Models.ExitConditions result = new Models.ExitConditions()
            {
                DefaultProperty = UtilitiesInternal.CreateObjectWithNullCheck(this.Default, (o) => o.GetTransportObject()),
                ExitCodeRanges  = UtilitiesInternal.ConvertToProtocolCollection(this.ExitCodeRanges),
                ExitCodes       = UtilitiesInternal.ConvertToProtocolCollection(this.ExitCodes),
                SchedulingError = UtilitiesInternal.CreateObjectWithNullCheck(this.SchedulingError, (o) => o.GetTransportObject()),
            };

            return(result);
        }
コード例 #21
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.UserAccount ITransportObjectProvider <Models.UserAccount> .GetTransportObject()
        {
            Models.UserAccount result = new Models.UserAccount()
            {
                ElevationLevel         = UtilitiesInternal.MapNullableEnum <Common.ElevationLevel, Models.ElevationLevel>(this.ElevationLevel),
                LinuxUserConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.LinuxUserConfiguration, (o) => o.GetTransportObject()),
                Name     = this.Name,
                Password = this.Password,
                WindowsUserConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.WindowsUserConfiguration, (o) => o.GetTransportObject()),
            };

            return(result);
        }
コード例 #22
0
 internal SubtaskInformation(Models.SubtaskInformation protocolObject)
 {
     this.computeNodeInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NodeInfo, o => new ComputeNodeInformation(o).Freeze());
     this.endTime       = protocolObject.EndTime;
     this.exitCode      = protocolObject.ExitCode;
     this.id            = protocolObject.Id;
     this.previousState = UtilitiesInternal.MapNullableEnum <Models.TaskState, Common.TaskState>(protocolObject.PreviousState);
     this.previousStateTransitionTime = protocolObject.PreviousStateTransitionTime;
     this.schedulingError             = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.SchedulingError, o => new TaskSchedulingError(o).Freeze());
     this.startTime           = protocolObject.StartTime;
     this.state               = UtilitiesInternal.MapNullableEnum <Models.TaskState, Common.TaskState>(protocolObject.State);
     this.stateTransitionTime = protocolObject.StateTransitionTime;
 }
コード例 #23
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.JobScheduleAddParameter ITransportObjectProvider<Models.JobScheduleAddParameter>.GetTransportObject()
        {
            Models.JobScheduleAddParameter result = new Models.JobScheduleAddParameter()
            {
                DisplayName = this.DisplayName,
                Id = this.Id,
                JobSpecification = UtilitiesInternal.CreateObjectWithNullCheck(this.JobSpecification, (o) => o.GetTransportObject()),
                Metadata = UtilitiesInternal.ConvertToProtocolCollection(this.Metadata),
                Schedule = UtilitiesInternal.CreateObjectWithNullCheck(this.Schedule, (o) => o.GetTransportObject()),
            };

            return result;
        }
コード例 #24
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.VirtualMachineConfiguration ITransportObjectProvider <Models.VirtualMachineConfiguration> .GetTransportObject()
        {
            Models.VirtualMachineConfiguration result = new Models.VirtualMachineConfiguration()
            {
                ContainerConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.ContainerConfiguration, (o) => o.GetTransportObject()),
                DataDisks            = UtilitiesInternal.ConvertToProtocolCollection(this.DataDisks),
                ImageReference       = UtilitiesInternal.CreateObjectWithNullCheck(this.ImageReference, (o) => o.GetTransportObject()),
                LicenseType          = this.LicenseType,
                NodeAgentSKUId       = this.NodeAgentSkuId,
                WindowsConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.WindowsConfiguration, (o) => o.GetTransportObject()),
            };

            return(result);
        }
コード例 #25
0
 public PropertyContainer(Models.NodeVMExtension protocolObject) : base(BindingState.Bound)
 {
     this.InstanceViewProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.InstanceView, o => new VMExtensionInstanceView(o).Freeze()),
         nameof(InstanceView),
         BindingAccess.Read);
     this.ProvisioningStateProperty = this.CreatePropertyAccessor(
         protocolObject.ProvisioningState,
         nameof(ProvisioningState),
         BindingAccess.Read);
     this.VmExtensionProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.VmExtension, o => new VMExtension(o).Freeze()),
         nameof(VmExtension),
         BindingAccess.Read);
 }
コード例 #26
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.ResourceFile ITransportObjectProvider <Models.ResourceFile> .GetTransportObject()
        {
            Models.ResourceFile result = new Models.ResourceFile()
            {
                AutoStorageContainerName = this.AutoStorageContainerName,
                BlobPrefix          = this.BlobPrefix,
                FileMode            = this.FileMode,
                FilePath            = this.FilePath,
                HttpUrl             = this.HttpUrl,
                IdentityReference   = UtilitiesInternal.CreateObjectWithNullCheck(this.IdentityReference, (o) => o.GetTransportObject()),
                StorageContainerUrl = this.StorageContainerUrl,
            };

            return(result);
        }
コード例 #27
0
 internal SubtaskInformation(Models.SubtaskInformation protocolObject)
 {
     this.ComputeNodeInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NodeInfo, o => new ComputeNodeInformation(o).Freeze());
     this.ContainerInformation   = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerInfo, o => new TaskContainerExecutionInformation(o).Freeze());
     this.EndTime            = protocolObject.EndTime;
     this.ExitCode           = protocolObject.ExitCode;
     this.FailureInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.FailureInfo, o => new TaskFailureInformation(o).Freeze());
     this.Id            = protocolObject.Id;
     this.PreviousState = UtilitiesInternal.MapNullableEnum <Models.SubtaskState, Common.SubtaskState>(protocolObject.PreviousState);
     this.PreviousStateTransitionTime = protocolObject.PreviousStateTransitionTime;
     this.Result              = UtilitiesInternal.MapNullableEnum <Models.TaskExecutionResult, Common.TaskExecutionResult>(protocolObject.Result);
     this.StartTime           = protocolObject.StartTime;
     this.State               = UtilitiesInternal.MapNullableEnum <Models.SubtaskState, Common.SubtaskState>(protocolObject.State);
     this.StateTransitionTime = protocolObject.StateTransitionTime;
 }
コード例 #28
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.AzureBlobFileSystemConfiguration ITransportObjectProvider <Models.AzureBlobFileSystemConfiguration> .GetTransportObject()
        {
            Models.AzureBlobFileSystemConfiguration result = new Models.AzureBlobFileSystemConfiguration()
            {
                AccountKey        = this.AccountKey,
                AccountName       = this.AccountName,
                BlobfuseOptions   = this.BlobfuseOptions,
                ContainerName     = this.ContainerName,
                IdentityReference = UtilitiesInternal.CreateObjectWithNullCheck(this.IdentityReference, (o) => o.GetTransportObject()),
                RelativeMountPath = this.RelativeMountPath,
                SasKey            = this.SasKey,
            };

            return(result);
        }
コード例 #29
0
 public PropertyContainer(Models.OutputFileBlobContainerDestination protocolObject) : base(BindingState.Bound)
 {
     this.ContainerUrlProperty = this.CreatePropertyAccessor(
         protocolObject.ContainerUrl,
         nameof(ContainerUrl),
         BindingAccess.Read);
     this.IdentityReferenceProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.IdentityReference, o => new ComputeNodeIdentityReference(o).Freeze()),
         nameof(IdentityReference),
         BindingAccess.Read);
     this.PathProperty = this.CreatePropertyAccessor(
         protocolObject.Path,
         nameof(Path),
         BindingAccess.Read);
 }
コード例 #30
0
        /// <summary>
        /// Return a protocol object of the requested type.
        /// </summary>
        /// <returns>The protocol object of the requested type.</returns>
        Models.StartTask ITransportObjectProvider <Models.StartTask> .GetTransportObject()
        {
            Models.StartTask result = new Models.StartTask()
            {
                CommandLine         = this.CommandLine,
                ContainerSettings   = UtilitiesInternal.CreateObjectWithNullCheck(this.ContainerSettings, (o) => o.GetTransportObject()),
                EnvironmentSettings = UtilitiesInternal.ConvertToProtocolCollection(this.EnvironmentSettings),
                MaxTaskRetryCount   = this.MaxTaskRetryCount,
                ResourceFiles       = UtilitiesInternal.ConvertToProtocolCollection(this.ResourceFiles),
                UserIdentity        = UtilitiesInternal.CreateObjectWithNullCheck(this.UserIdentity, (o) => o.GetTransportObject()),
                WaitForSuccess      = this.WaitForSuccess,
            };

            return(result);
        }