52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace azupack_flac
|
|
{
|
|
public class AzupackMeta
|
|
{
|
|
public AzupackMeta()
|
|
{
|
|
this.Guid = Guid.NewGuid();
|
|
this.Timestamp = DateTime.Now;
|
|
this.MachineName = Environment.MachineName;
|
|
this.UserName = Environment.UserName;
|
|
|
|
System.Reflection.Assembly assembly = this.GetType().Assembly;
|
|
System.Reflection.AssemblyName assemblyName = assembly.GetName();
|
|
this.AssemblyName = assemblyName.FullName;
|
|
}
|
|
|
|
public Guid Guid { get; set; }
|
|
public DateTime Timestamp { get; set; }
|
|
public string MachineName { get; set; }
|
|
|
|
private string _userName;
|
|
public string UserName
|
|
{
|
|
get => _userName;
|
|
set
|
|
{
|
|
if (value.Equals("Sascha Schiemann"))
|
|
{
|
|
value = "Feyris-Tan";
|
|
}
|
|
_userName = value;
|
|
}
|
|
}
|
|
|
|
public string AssemblyName { get; set; }
|
|
|
|
public override string ToString()
|
|
{
|
|
StringWriter stringWriter = new StringWriter();
|
|
XmlSerializer xs = new XmlSerializer(typeof(AzupackMeta));
|
|
xs.Serialize(stringWriter, this);
|
|
stringWriter.Flush();
|
|
return stringWriter.ToString();
|
|
}
|
|
}
|
|
}
|