You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
867 B
33 lines
867 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace NzbDrone.Common.Contract
|
|
{
|
|
public abstract class ReportBase
|
|
{
|
|
[JsonProperty("v")]
|
|
public string Version { get; set; }
|
|
|
|
[JsonProperty("p")]
|
|
public bool IsProduction { get; set; }
|
|
|
|
[JsonProperty("u")]
|
|
public Guid UGuid { get; set; }
|
|
|
|
public override string ToString()
|
|
{
|
|
var childString = "";
|
|
foreach (var keyValue in GetString())
|
|
{
|
|
childString += string.Format("{0}: {1} ", keyValue.Key, keyValue.Value);
|
|
}
|
|
|
|
return string.Format("[{0} Prd:{1} V:{2} ID:{3} | {4}]", GetType().Name, IsProduction, Version, UGuid, childString.Trim());
|
|
}
|
|
|
|
protected abstract Dictionary<string,string> GetString();
|
|
}
|
|
}
|