public void Initialize() { InitializeData(); HTTPConfigurationProvider configurationProvider = new HTTPConfigurationProvider(); _community = new Community(IsolatedStorageStorageStrategy.Load()) .AddAsynchronousCommunicationStrategy(new BinaryHTTPAsynchronousCommunicationStrategy(configurationProvider)) .Register<CorrespondenceModel>() .Subscribe(() => _attendee.Conference) .Subscribe(() => _individual) .Subscribe(() => _attendee.ScheduledSessions) ; Individual identity = _community.AddFact(new Individual(GetAnonymousUserId())); _attendee = identity.GetAttendee(CommonSettings.ConferenceID); configurationProvider.Individual = identity; // Synchronize whenever the user has something to send. _community.FactAdded += delegate { Synchronize(); }; // Synchronize when the network becomes available. System.Net.NetworkInformation.NetworkChange.NetworkAddressChanged += (sender, e) => { if (NetworkInterface.GetIsNetworkAvailable()) Synchronize(); }; // And synchronize on startup or resume. Synchronize(); //DataLoader.Load(conference); }
public TrackDayViewModel(Attendee attendee, Track track, Day day, ImageCache imageCache) { _attendee = attendee; _track = track; _day = day; _imageCache = imageCache; }
public ScheduleViewModel(SynchronizationService synchronizationService, Attendee attendee, ImageCache imageCache, SearchModel searchModel) { _synchronizationService = synchronizationService; _attendee = attendee; _imageCache = imageCache; _searchModel = searchModel; }
public MainViewModel(Attendee attendee, SynchronizationService synhronizationService, ImageCache imageCache, SearchModel searchModel, Clock clock) { _attendee = attendee; _synhronizationService = synhronizationService; _imageCache = imageCache; _searchModel = searchModel; _clock = clock; }
public TracksViewModel(Attendee attendee, ImageCache imageCache, SearchModel searchModel) { _attendee = attendee; _imageCache = imageCache; _searchModel = searchModel; _tracks = new DependentList<Track>(() => from track in _attendee.Conference.Tracks orderby track.Name select track); }
public SearchDayViewModel(Attendee attendee, Day day, ImageCache imageCache, SearchModel searchModel) { _attendee = attendee; _day = day; _imageCache = imageCache; _searchModel = searchModel; _matchingSessionPlaces = new DependentList<SessionPlace>(() => _searchModel.SearchTerm == null || _searchModel.SearchTerm.Length < 3 ? Enumerable.Empty<SessionPlace>() : from time in _day.Times from sessionPlace in time.AvailableSessions where sessionPlace.Session.Matches(_searchModel.SearchTerm.ToLower()) select sessionPlace); }
// Business constructor public Slot( Attendee attendee ,Time slotTime ) { InitializeResults(); _attendee = new PredecessorObj<Attendee>(this, GetRoleAttendee(), attendee); _slotTime = new PredecessorObj<Time>(this, GetRoleSlotTime(), slotTime); }
public CorrespondenceFact CreateFact(FactMemento memento) { Attendee newFact = new Attendee(memento); return newFact; }
public CorrespondenceFact CreateFact(FactMemento memento) { Attendee newFact = new Attendee(memento); // Create a memory stream from the memento data. using (MemoryStream data = new MemoryStream(memento.Data)) { using (BinaryReader output = new BinaryReader(data)) { newFact._identifier = (string)_fieldSerializerByType[typeof(string)].ReadData(output); } } return newFact; }
// Fields // Results // Business constructor public IndividualAttendee( Individual individual ,Attendee attendee ) { InitializeResults(); _individual = new PredecessorObj<Individual>(this, GetRoleIndividual(), individual); _attendee = new PredecessorObj<Attendee>(this, GetRoleAttendee(), attendee); }
public ScheduleDayViewModel(Day day, Attendee attendee, ImageCache imageCache) { _day = day; _attendee = attendee; _imageCache = imageCache; }
public NoticesViewModel(Attendee attendee, ImageCache imageCache, Clock clock) { _attendee = attendee; _imageCache = imageCache; _clock = clock; }
public SettingsViewModel(Individual individual, Attendee attendee) { _individual = individual; _attendee = attendee; }
public ScheduleDayViewModel(DateTime date, Attendee attendee, ImageCache imageCache) { _date = date; _attendee = attendee; _imageCache = imageCache; }
public SpeakerViewModel(Attendee attendee, Speaker speaker, ImageCache imageCache) { _attendee = attendee; _speaker = speaker; _imageCache = imageCache; }
public TrackViewModel(Attendee attendee, Track track, ImageCache imageCache) { _attendee = attendee; _track = track; _imageCache = imageCache; }
public SearchViewModel(Attendee attendee, ImageCache imageCache, SearchModel searchModel) { _attendee = attendee; _imageCache = imageCache; _searchModel = searchModel; }
public ScheduleSlotViewModel(Attendee attendee, Time time, ImageCache imageCache) { _attendee = attendee; _time = time; _imageCache = imageCache; }
// Fields // Results // Business constructor public AttendeeInactive( Attendee attendee ) { _unique = Guid.NewGuid(); InitializeResults(); _attendee = new PredecessorObj<Attendee>(this, GetRoleAttendee(), attendee); }