Creating models for to serialize and deserialize when calling the rest API

This commit is contained in:
elitsa
2020-02-18 14:50:30 +01:00
parent b2ddc4a2b0
commit 1b3769f5d7
2 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Umbraco.Core.Models
{
public class InstallLog
{
public Guid InstallId { get; }
public bool IsUpgrade { get; }
public bool InstallCompleted { get; }
public DateTime Timestamp { get; }
public int VersionMajor { get; }
public int VersionMinor { get; }
public int VersionPatch { get; }
public string VersionComment { get; }
public string Error { get; }
public string UserAgent { get; }
public string DbProvider { get; }
public InstallLog(Guid installId, bool isUpgrade, bool installCompleted, DateTime timestamp, int versionMajor, int versionMinor, int versionPatch, string versionComment, string error, string userAgent, string dbProvider)
{
InstallId = installId;
IsUpgrade = isUpgrade;
InstallCompleted = installCompleted;
Timestamp = timestamp;
VersionMajor = versionMajor;
VersionMinor = versionMinor;
VersionPatch = versionPatch;
VersionComment = versionComment;
Error = error;
UserAgent = userAgent;
DbProvider = dbProvider;
}
}
}

View File

@@ -0,0 +1,16 @@
namespace Umbraco.Core.Models
{
public class UpgradeResult
{
public string UpgradeType { get; }
public string Comment { get; }
public string UpgradeUrl { get; }
public UpgradeResult(string upgradeType, string comment, string upgradeUrl)
{
UpgradeType = upgradeType;
Comment = comment;
UpgradeUrl = upgradeUrl;
}
}
}