using System; namespace TellmePdmsPluging.Models { public class OpenProjectRequest { public string ExecutionId { get; set; } public string execution_id { get { return ExecutionId; } set { ExecutionId = value; } } /// /// PDMS Project name /// public string ProjectName { get; set; } /// /// PDMS login user name /// public string UserName { get; set; } /// /// PDMS login password /// public string Password { get; set; } public void ApplyDefaults() { ProjectName = Normalize(ProjectName); UserName = Normalize(UserName); Password = Password ?? string.Empty; } private static string Normalize(string value) { if (IsNullOrWhiteSpace(value)) { return null; } return value.Trim(); } private static bool IsNullOrWhiteSpace(string value) { if (value == null) { return true; } for (int i = 0; i < value.Length; i++) { if (!char.IsWhiteSpace(value[i])) { return false; } } return true; } } public class OpenProjectResult { public bool Success { get; set; } public string Message { get; set; } public string ProjectName { get; set; } public bool WasAlreadyOpen { get; set; } public long FileSize { get; set; } public long PolygonCount { get; set; } public long FeatureCount { get; set; } public DateTime CompletedAt { get; set; } } }