コード例 #1
0
ファイル: Report.cs プロジェクト: viruskone/reboard
 private Report(ReportTitle title, string description, ReportShortcut shortcut, Color color)
 {
     Title       = title;
     Description = description;
     Shortcut    = shortcut;
     Color       = color;
     CreateTime  = DateTime.Now;
     Id          = Guid.NewGuid();
 }
コード例 #2
0
ファイル: Report.cs プロジェクト: viruskone/reboard
 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]);
コード例 #3
0
ファイル: Report.cs プロジェクト: viruskone/reboard
 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);
 }
コード例 #4
0
ファイル: Report.cs プロジェクト: viruskone/reboard
 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));
 }