private static Conference DefineConference(ICommunity community, Catalog catalog, string name, string imageUrl, DateTime startDate, DateTime endDate, string city) { var conference = community.AddFact(new Conference()); var header = community.AddFact(new ConferenceHeader(catalog, conference)); header.Name = name; header.ImageUrl = imageUrl; header.StartDate = startDate; header.EndDate = endDate; header.City = city; header.Address = "111 Main Street"; header.HomePageUrl = "awesomefest.com"; header.Description.SetString( "Awesomeness!! Go to AwesomeFest!!!", value => header.Description = value, community); return conference; }
public CorrespondenceFact CreateFact(FactMemento memento) { Catalog newFact = new Catalog(memento); // Create a memory stream from the memento data. using (MemoryStream data = new MemoryStream(memento.Data)) { using (BinaryReader output = new BinaryReader(data)) { newFact._domain = (string)_fieldSerializerByType[typeof(string)].ReadData(output); } } return newFact; }
// Business constructor public ConferenceHeader( Catalog catalog ,Conference conference ) { _unique = Guid.NewGuid(); InitializeResults(); _catalog = new PredecessorObj<Catalog>(this, GetRoleCatalog(), catalog); _conference = new PredecessorObj<Conference>(this, GetRoleConference(), conference); }
public ConferenceListViewModel(Catalog catalog, ConferenceSelection selection, Func<ConferenceHeader, ConferenceHeaderViewModel> makeConferenceHeaderViewModel) { _catalog = catalog; _selection = selection; _makeConferenceHeaderViewModel = makeConferenceHeaderViewModel; }