Esempio n. 1
0
 public JournalEntry(RunningDeployment deployment, bool wasSuccessful)
     : this(Guid.NewGuid().ToString(),
            deployment.Variables.Get(DeploymentEnvironment.Id),
            deployment.Variables.Get(DeploymentVariables.Tenant.Id),
            deployment.Variables.Get(ProjectVariables.Id),
            deployment.Variables.Get(KnownVariables.RetentionPolicySet),
            DateTime.UtcNow,
            deployment.Variables.Get(KnownVariables.OriginalPackageDirectoryPath),
            deployment.Variables.Get(PackageVariables.CustomInstallationDirectory),
            wasSuccessful,
            DeployedPackage.GetDeployedPackages(deployment)
            )
 {
 }
Esempio n. 2
0
 public JournalEntry(XElement element)
     : this(
         element.Attribute("Id")?.Value,
         element.Attribute("EnvironmentId")?.Value,
         element.Attribute("TenantId")?.Value,
         element.Attribute("ProjectId")?.Value,
         element.Attribute("RetentionPolicySet")?.Value,
         ParseDate(element.Attribute("InstalledOn")?.Value),
         element.Attribute("ExtractedTo")?.Value,
         element.Attribute("CustomInstallationDirectory")?.Value,
         ParseBool(element.Attribute("WasSuccessful")?.Value) ?? true,
         DeployedPackage.FromJournalEntryElement(element)
         )
 {
 }
Esempio n. 3
0
 internal JournalEntry(string id,
                       string environmentId,
                       string tenantId,
                       string projectId,
                       string retentionPolicySet,
                       DateTime installedOn,
                       string extractedTo,
                       string customInstallationDirectory,
                       bool wasSuccessful,
                       DeployedPackage package)
     : this(id,
            environmentId,
            tenantId,
            projectId,
            retentionPolicySet,
            installedOn,
            extractedTo,
            customInstallationDirectory,
            wasSuccessful,
            package != null ? (IEnumerable <DeployedPackage>) new[] { package } : new List <DeployedPackage>())
 {
 }