private Report(ReportTitle title, string description, ReportShortcut shortcut, Color color) { Title = title; Description = description; Shortcut = shortcut; Color = color; CreateTime = DateTime.Now; Id = Guid.NewGuid(); }
public static Report Make( Guid id, ReportTitle title, string description, ReportShortcut shortcut, Color color, TimeSpan averageDuration, DateTime createTime, int downloads) => new Report( id, title, description, shortcut, color, averageDuration, createTime, downloads, new UserId[0], new CompanyId[0]);
private Report( Guid id, ReportTitle title, string description, ReportShortcut shortcut, Color color, TimeSpan averageDuration, DateTime createTime, int downloads, UserId[] allowedUsers, CompanyId[] allowedCompanies ) { Id = id; Title = title; Description = description; Shortcut = shortcut; Color = color; AverageGenerationTime = averageDuration; CreateTime = createTime; DownloadTimes = downloads; _allowedUsers = new List <UserId>(allowedUsers); _allowedCompanies = new List <CompanyId>(allowedCompanies); }
public static Report CreateNew(ReportTitle title, string description, ReportShortcut shortcut, Color color, IReportUniqueTitleChecker checker) { CheckRule(new ReportTitleMustBeUniqueRule(checker, title)); return(new Report(title, description, shortcut, color)); }