Reduce catalog to Phase 1 ACC/PROD view
This commit is contained in:
@@ -1,37 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace BizTalkApplicationCatalog.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Enthält die vollständig normalisierten Ergebnisse eines Inventarlaufs.
|
||||
/// Arbeitsmodell eines lokalen, ausschließlich lesenden Inventarlaufs.
|
||||
/// </summary>
|
||||
internal sealed class InventoryDocument
|
||||
{
|
||||
public InventoryDocument()
|
||||
{
|
||||
SystemProperties = new List<NameValueRecord>();
|
||||
Applications = new List<ApplicationRecord>();
|
||||
Artifacts = new List<ArtifactRecord>();
|
||||
Hosts = new List<HostRecord>();
|
||||
Coverage = new List<CoverageRecord>();
|
||||
Endpoints = new List<EndpointRecord>();
|
||||
Findings = new List<Finding>();
|
||||
SectionStatuses = new List<SectionStatus>();
|
||||
}
|
||||
|
||||
public string EnvironmentName { get; set; }
|
||||
public string ComputerName { get; set; }
|
||||
public string ToolVersion { get; set; }
|
||||
public string ManagementServer { get; set; }
|
||||
public string ManagementDatabase { get; set; }
|
||||
public DateTime StartedUtc { get; set; }
|
||||
public DateTime CompletedUtc { get; set; }
|
||||
public List<NameValueRecord> SystemProperties { get; private set; }
|
||||
public List<ApplicationRecord> Applications { get; private set; }
|
||||
public List<ArtifactRecord> Artifacts { get; private set; }
|
||||
public List<HostRecord> Hosts { get; private set; }
|
||||
public List<CoverageRecord> Coverage { get; private set; }
|
||||
public List<EndpointRecord> Endpoints { get; private set; }
|
||||
public List<Finding> Findings { get; private set; }
|
||||
public List<SectionStatus> SectionStatuses { get; private set; }
|
||||
|
||||
@@ -48,57 +40,12 @@ namespace BizTalkApplicationCatalog.Models
|
||||
internal sealed class ApplicationRecord
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Status { get; set; }
|
||||
public string IsDefault { get; set; }
|
||||
public string Source { get; set; }
|
||||
}
|
||||
|
||||
internal sealed class ArtifactRecord
|
||||
internal sealed class EndpointRecord
|
||||
{
|
||||
public ArtifactRecord()
|
||||
{
|
||||
Properties = new List<NameValueRecord>();
|
||||
}
|
||||
|
||||
public string Type { get; set; }
|
||||
public string ApplicationName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Status { get; set; }
|
||||
public string HostName { get; set; }
|
||||
public string AdapterName { get; set; }
|
||||
public string ParentName { get; set; }
|
||||
public string Address { get; set; }
|
||||
public List<NameValueRecord> Properties { get; private set; }
|
||||
|
||||
public string Property(string name)
|
||||
{
|
||||
var match = Properties.FirstOrDefault(item =>
|
||||
string.Equals(item.Name, name, StringComparison.OrdinalIgnoreCase));
|
||||
return match == null ? string.Empty : match.Value;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class HostRecord
|
||||
{
|
||||
public string Category { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Server { get; set; }
|
||||
public string Status { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string WindowsGroup { get; set; }
|
||||
public string Is32BitOnly { get; set; }
|
||||
public string Trusted { get; set; }
|
||||
public string AdapterName { get; set; }
|
||||
}
|
||||
|
||||
internal sealed class CoverageRecord
|
||||
{
|
||||
public string DataSource { get; set; }
|
||||
public string Status { get; set; }
|
||||
public int RowCount { get; set; }
|
||||
public string Required { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string AdapterType { get; set; }
|
||||
}
|
||||
|
||||
internal sealed class Finding
|
||||
@@ -118,21 +65,62 @@ namespace BizTalkApplicationCatalog.Models
|
||||
public long DurationMilliseconds { get; set; }
|
||||
}
|
||||
|
||||
internal sealed class NameValueRecord
|
||||
/// <summary>
|
||||
/// Kleines, transportierbares JSON-Modell für den ACC/PRD-Abgleich.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
internal sealed class CatalogSnapshot
|
||||
{
|
||||
public NameValueRecord()
|
||||
public CatalogSnapshot()
|
||||
{
|
||||
SchemaVersion = 1;
|
||||
Applications = new List<CatalogApplication>();
|
||||
}
|
||||
|
||||
public NameValueRecord(string name, string value, string source = "")
|
||||
[DataMember(Order = 1)]
|
||||
public int SchemaVersion { get; set; }
|
||||
|
||||
[DataMember(Order = 2)]
|
||||
public string EnvironmentName { get; set; }
|
||||
|
||||
[DataMember(Order = 3)]
|
||||
public string ComputerName { get; set; }
|
||||
|
||||
[DataMember(Order = 4)]
|
||||
public string CreatedUtc { get; set; }
|
||||
|
||||
[DataMember(Order = 5)]
|
||||
public bool IsComplete { get; set; }
|
||||
|
||||
[DataMember(Order = 6)]
|
||||
public List<CatalogApplication> Applications { get; set; }
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
internal sealed class CatalogApplication
|
||||
{
|
||||
public CatalogApplication()
|
||||
{
|
||||
Name = name ?? string.Empty;
|
||||
Value = value ?? string.Empty;
|
||||
Source = source ?? string.Empty;
|
||||
AdapterCounts = new List<AdapterCount>();
|
||||
}
|
||||
|
||||
[DataMember(Order = 1)]
|
||||
public string Name { get; set; }
|
||||
public string Value { get; set; }
|
||||
public string Source { get; set; }
|
||||
|
||||
[DataMember(Order = 2)]
|
||||
public int EndpointCount { get; set; }
|
||||
|
||||
[DataMember(Order = 3)]
|
||||
public List<AdapterCount> AdapterCounts { get; set; }
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
internal sealed class AdapterCount
|
||||
{
|
||||
[DataMember(Order = 1)]
|
||||
public string AdapterType { get; set; }
|
||||
|
||||
[DataMember(Order = 2)]
|
||||
public int Count { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user