Пример #1
0
 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
 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
 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
 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
 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
 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);