public DeploymentApiModel(DeploymentServiceModel serviceModel, IDictionary <string, DeploymentStatus> deviceStatuses) { this.CreatedDateTimeUtc = serviceModel.CreatedDateTimeUtc; this.DeploymentId = serviceModel.Id; this.DeviceGroupId = serviceModel.DeviceGroupId; this.Name = serviceModel.Name; this.Priority = serviceModel.Priority; this.Type = serviceModel.Type; this.Metrics = new DeploymentMetricsApiModel(serviceModel.DeploymentMetrics) { DeviceStatuses = deviceStatuses }; }
public DeploymentApiModel(DeploymentServiceModel serviceModel) { this.CreatedDateTimeUtc = serviceModel.CreatedDateTimeUtc; this.DeploymentId = serviceModel.Id; this.DeviceGroupId = serviceModel.DeviceGroupId; this.DeviceGroupName = serviceModel.DeviceGroupName; this.DeviceGroupQuery = serviceModel.DeviceGroupQuery; this.Name = serviceModel.Name; this.PackageContent = serviceModel.PackageContent; this.PackageName = serviceModel.PackageName; this.Priority = serviceModel.Priority; this.Type = serviceModel.Type; this.Metrics = new DeploymentMetricsApiModel(serviceModel.DeploymentMetrics) { DeviceStatuses = serviceModel.DeploymentMetrics?.DeviceStatuses }; }