public Log(Client client, DateTime UTCtime, string value, LogTypeNames logtype) { this.IDClient = client.ID; switch (logtype) { case LogTypeNames.Error: this.LogType = 1; break; case LogTypeNames.Warning: this.LogType = 2; break; case LogTypeNames.Message: this.LogType = 3; break; } this.UTCTime = UTCtime; this.Value = value; }
public Log(Client client, BackupInfo backup, DateTime UTCtime, string value, LogTypeNames logtype) : this(client, UTCtime, value, logtype) { this.IDBackup = backup.ID; }
internal void Create(Client client, BackupInfo backup, string message, LogTypeNames type) { this.Add(new Log(client, backup, DateTime.UtcNow, message, type)); }
/// <summary> /// Creates a LogType entity from an enum value /// </summary> /// <param name="name">LogTypeNames enum value</param> /// <returns>LogType entity</returns> private static LogType GetLogEntryType(LogTypeNames name) { return new LogType{LogTypeId = (int)name, Type = name.ToString()}; }