internal PSTaskInformation(Microsoft.Azure.Batch.TaskInformation omObject)
 {
     if ((omObject == null))
     {
         throw new System.ArgumentNullException("omObject");
     }
     this.omObject = omObject;
 }
 internal PSTaskInformation(Microsoft.Azure.Batch.TaskInformation omObject)
 {
     if ((omObject == null))
     {
         throw new System.ArgumentNullException("omObject");
     }
     this.omObject = omObject;
 }
 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);
 }
Beispiel #4
0
 public PropertyContainer(Models.ComputeNode protocolObject) : base(BindingState.Bound)
 {
     this.AffinityIdProperty = this.CreatePropertyAccessor(
         protocolObject.AffinityId,
         "AffinityId",
         BindingAccess.Read);
     this.AllocationTimeProperty = this.CreatePropertyAccessor(
         protocolObject.AllocationTime,
         "AllocationTime",
         BindingAccess.Read);
     this.CertificateReferencesProperty = this.CreatePropertyAccessor(
         CertificateReference.ConvertFromProtocolCollectionReadOnly(protocolObject.CertificateReferences),
         "CertificateReferences",
         BindingAccess.Read);
     this.ErrorsProperty = this.CreatePropertyAccessor(
         ComputeNodeError.ConvertFromProtocolCollectionReadOnly(protocolObject.Errors),
         "Errors",
         BindingAccess.Read);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         "Id",
         BindingAccess.Read);
     this.IPAddressProperty = this.CreatePropertyAccessor(
         protocolObject.IpAddress,
         "IPAddress",
         BindingAccess.Read);
     this.LastBootTimeProperty = this.CreatePropertyAccessor(
         protocolObject.LastBootTime,
         "LastBootTime",
         BindingAccess.Read);
     this.RecentTasksProperty = this.CreatePropertyAccessor(
         TaskInformation.ConvertFromProtocolCollectionReadOnly(protocolObject.RecentTasks),
         "RecentTasks",
         BindingAccess.Read);
     this.RunningTasksCountProperty = this.CreatePropertyAccessor(
         protocolObject.RunningTasksCount,
         "RunningTasksCount",
         BindingAccess.Read);
     this.SchedulingStateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum<Models.SchedulingState, Common.SchedulingState>(protocolObject.SchedulingState),
         "SchedulingState",
         BindingAccess.Read);
     this.StartTaskProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTask, o => new StartTask(o).Freeze()),
         "StartTask",
         BindingAccess.Read);
     this.StartTaskInformationProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTaskInfo, o => new StartTaskInformation(o).Freeze()),
         "StartTaskInformation",
         BindingAccess.Read);
     this.StateProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.MapNullableEnum<Models.ComputeNodeState, Common.ComputeNodeState>(protocolObject.State),
         "State",
         BindingAccess.Read);
     this.StateTransitionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.StateTransitionTime,
         "StateTransitionTime",
         BindingAccess.Read);
     this.TotalTasksRunProperty = this.CreatePropertyAccessor(
         protocolObject.TotalTasksRun,
         "TotalTasksRun",
         BindingAccess.Read);
     this.TotalTasksSucceededProperty = this.CreatePropertyAccessor(
         protocolObject.TotalTasksSucceeded,
         "TotalTasksSucceeded",
         BindingAccess.Read);
     this.UrlProperty = this.CreatePropertyAccessor(
         protocolObject.Url,
         "Url",
         BindingAccess.Read);
     this.VirtualMachineSizeProperty = this.CreatePropertyAccessor(
         protocolObject.VmSize,
         "VirtualMachineSize",
         BindingAccess.Read);
 }