Projektdateien hinzufügen.
This commit is contained in:
79
EPI2CrewbrainFile/Documents.cs
Normal file
79
EPI2CrewbrainFile/Documents.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
// Documents.cs
|
||||
namespace EPI2CrewbrainFile
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
public partial class Documents
|
||||
{
|
||||
[JsonProperty("ID")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[JsonProperty("DokumentID")]
|
||||
public long DokumentId { get; set; }
|
||||
|
||||
[JsonProperty("Zugehoerigkeit")]
|
||||
public string Zugehoerigkeit { get; set; }
|
||||
|
||||
[JsonProperty("ZugehoerigkeitID")]
|
||||
public long ZugehoerigkeitId { get; set; }
|
||||
|
||||
[JsonProperty("Sichtbarkeit")]
|
||||
public long Sichtbarkeit { get; set; }
|
||||
|
||||
[JsonProperty("AngelegtID")]
|
||||
public long AngelegtId { get; set; }
|
||||
|
||||
[JsonProperty("AngelegtDatum")]
|
||||
public DateTimeOffset AngelegtDatum { get; set; }
|
||||
|
||||
[JsonProperty("GeaendertID")]
|
||||
public long GeaendertId { get; set; }
|
||||
|
||||
[JsonProperty("GeaendertDatum")]
|
||||
public DateTimeOffset GeaendertDatum { get; set; }
|
||||
|
||||
[JsonProperty("Geloescht")]
|
||||
public object Geloescht { get; set; }
|
||||
|
||||
[JsonProperty("Dateiname")]
|
||||
public string Dateiname { get; set; }
|
||||
|
||||
[JsonProperty("Dateiendung")]
|
||||
public string Dateiendung { get; set; }
|
||||
|
||||
[JsonProperty("Groesse")]
|
||||
public long Groesse { get; set; }
|
||||
|
||||
[JsonProperty("FremdKundenID")]
|
||||
public long FremdKundenId { get; set; }
|
||||
|
||||
[JsonProperty("URL")]
|
||||
public Uri Url { get; set; }
|
||||
|
||||
public static List<Documents> FromJson(string json) =>
|
||||
JsonConvert.DeserializeObject<List<Documents>>(json, Converter.Settings);
|
||||
}
|
||||
|
||||
public static class Serialize
|
||||
{
|
||||
public static string ToJson(this List<Documents> self) =>
|
||||
JsonConvert.SerializeObject(self, Converter.Settings);
|
||||
}
|
||||
|
||||
internal static class Converter
|
||||
{
|
||||
public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
|
||||
{
|
||||
MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
|
||||
DateParseHandling = DateParseHandling.None,
|
||||
Converters =
|
||||
{
|
||||
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user