コード例 #1
0
ファイル: TalkView.cs プロジェクト: omega-code/FreePeople
 public TalkView(
     Guid id, CityView city, SpeakerView speaker, DateTime startsAt, TalkStatus status,
     string name, string comment, string shortInfo, string fullInfo,
     DateTime?approvedAt, AdministratorView approvedBy,
     DateTime?placeVerifiedAt, AdministratorView placeVerifiedBy, PlaceView place,
     DateTime?publishedAt, AdministratorView publishedBy,
     DateTime?reportedAt, AdministratorView reportedBy, string report)
 {
     Id              = id;
     City            = city;
     Speaker         = speaker;
     StartsAt        = startsAt;
     Status          = status;
     Name            = name;
     Comment         = comment;
     ShortInfo       = shortInfo;
     FullInfo        = fullInfo;
     ApprovedAt      = approvedAt;
     ApprovedBy      = approvedBy;
     PlaceVerifiedAt = placeVerifiedAt;
     PlaceVerifiedBy = placeVerifiedBy;
     Place           = place;
     PublishedAt     = publishedAt;
     PublishedBy     = publishedBy;
     ReportedAt      = reportedAt;
     ReportedBy      = reportedBy;
     Report          = report;
 }
コード例 #2
0
 public AdministratorView(Guid id, CityView city, string email, string name)
 {
     Id    = id;
     City  = city;
     Email = email;
     Name  = name;
 }
コード例 #3
0
ファイル: PlaceView.cs プロジェクト: omega-code/FreePeople
 public PlaceView(Guid id, CityView city, string name, string mapUrl, string howToGet, string address, string contactPhone, string contactName)
 {
     Id           = id;
     City         = city;
     Name         = name;
     MapUrl       = mapUrl;
     HowToGet     = howToGet;
     Address      = address;
     ContactPhone = contactPhone;
     ContactName  = contactName;
 }
コード例 #4
0
ファイル: SpeakerView.cs プロジェクト: omega-code/FreePeople
 public SpeakerView(Guid id, CityView city, string name, byte[] photo, string about, string email, Option <string> facebook, Option <string> phone)
 {
     Id       = id;
     City     = city;
     Name     = name;
     Photo    = photo;
     About    = about;
     Email    = email;
     Facebook = facebook;
     Phone    = phone;
 }
コード例 #5
0
ファイル: TalkView.cs プロジェクト: omega-code/FreePeople
 public static TalkView FromDomain(Talk talk) => new TalkView(
     talk.Id, CityView.FromDomain(talk.City), SpeakerView.FromDomain(talk.Speaker),
     talk.StartsAt, talk.Status,
     talk.Name, talk.Comment, talk.ShortInfo, talk.FullInfo,
     talk.ApprovedAt.Map(x => (DateTime?)x).ValueOr((DateTime?)null),
     talk.ApprovedBy.Map(AdministratorView.FromDomain).ValueOr((AdministratorView)null),
     talk.PlaceVerifiedAt.Map(x => (DateTime?)x).ValueOr((DateTime?)null),
     talk.PlaceVerifiedBy.Map(AdministratorView.FromDomain).ValueOr((AdministratorView)null),
     talk.Place.Map(PlaceView.FromDomain).ValueOr((PlaceView)null),
     talk.PublishedAt.Map(x => (DateTime?)x).ValueOr((DateTime?)null),
     talk.PublishedBy.Map(AdministratorView.FromDomain).ValueOr((AdministratorView)null),
     talk.ReportedAt.Map(x => (DateTime?)x).ValueOr((DateTime?)null),
     talk.ReportedBy.Map(AdministratorView.FromDomain).ValueOr((AdministratorView)null),
     talk.Report.ValueOr((string)null)
     );
コード例 #6
0
ファイル: PlaceView.cs プロジェクト: omega-code/FreePeople
 public static PlaceView FromDomain(Place e) => new PlaceView(e.Id, CityView.FromDomain(e.City), e.Name, e.MapUrl, e.HowToGet, e.Address, e.ContactPhone, e.ContactName);
コード例 #7
0
 public TalkCalendarView(DateTime month, CityView city, IReadOnlyCollection <TalkView> talks)
 {
     Month = month;
     City  = city;
     Talks = talks;
 }
コード例 #8
0
ファイル: SpeakerView.cs プロジェクト: omega-code/FreePeople
 public static SpeakerView FromDomain(Speaker e) => new SpeakerView(e.Id, CityView.FromDomain(e.City), e.Name, e.Photo, e.About, e.Email, e.Facebook, e.Phone);
コード例 #9
0
 public static AdministratorView FromDomain(Administrator e) => new AdministratorView(e.Id, CityView.FromDomain(e.City), e.Email, e.Name);