public Log(LogId id, string code, LogLevel logLevel, User user, string className, string methodName, string title, string messages) { if (id == null) { throw new ArgumentNullException("id"); } this.id = id; this.code = code; this.logLevel = logLevel; if (user != null) { this.partyId = user.Id; } this.className = className; this.methodName = methodName; this.logDate = DateTime.Now; if (!string.IsNullOrEmpty(title) && title.Length > 200) { this.title = title.Substring(0, 199); } else { this.title = title; } if (!string.IsNullOrEmpty(messages) && messages.Length > 4000) { this.messages = messages.Substring(0, 3999); } else { this.messages = messages; } }
public bool SameValueAs(LogId other) { return(Guid.Equals(other.Guid)); }
public ExceptionLog(LogId id, string code, LogLevel logLevel, User party, string className, string methodName, string title, string messages) : base(id, code, logLevel, party, className, methodName, title, messages) { }