예제 #1
0
 public static IoTEdgeReleaseEnvironment Create(VstsReleaseEnvironment vstsReleaseEnvironment)
 => new IoTEdgeReleaseEnvironment(
     vstsReleaseEnvironment.Id,
     vstsReleaseEnvironment.DefinitionId,
     vstsReleaseEnvironment.DefinitionName,
     vstsReleaseEnvironment.Status,
     vstsReleaseEnvironment?.Deployments?.Select(IoTEdgeReleaseDeployment.Create).ToHashSet() ?? new HashSet <IoTEdgeReleaseDeployment>());
예제 #2
0
        public void TestCreate()
        {
            var vstsReleaseEnv = new VstsReleaseEnvironment {
                Id = 83429, DefinitionId = 2349080, Status = VstsEnvironmentStatus.Rejected
            };

            IoTEdgeReleaseEnvironment releaseEnv = IoTEdgeReleaseEnvironment.Create(vstsReleaseEnv);

            Assert.AreEqual(83429, releaseEnv.Id);
            Assert.AreEqual(2349080, releaseEnv.DefinitionId);
            Assert.AreEqual(VstsEnvironmentStatus.Rejected, releaseEnv.Status);
        }
예제 #3
0
 public static IoTEdgeReleaseEnvironment Create(VstsReleaseEnvironment vstsReleaseEnvironment)
 => new IoTEdgeReleaseEnvironment(vstsReleaseEnvironment.Id, vstsReleaseEnvironment.DefinitionId, vstsReleaseEnvironment.DefinitionName, vstsReleaseEnvironment.Status);