public void Initialize() { _community = new Community(new MemoryStorageStrategy()) .Register<CorrespondenceModel>(); _identity = _community.AddFact(new Identity("mike")); _viewModel = new HomeViewModel(_identity, new NavigationModel()); }
public void Initialize() { _community = new Community(new MemoryStorageStrategy()) .Register<Model.CorrespondenceModel>(); _identity = _community.AddFact(new Identity("mike")); Cloud cloud = _community.AddFact(new Cloud(_identity)); _cloudViewModel = new CloudViewModel(cloud, new CloudNavigationModel(cloud)); }
public CorrespondenceFact CreateFact(FactMemento memento) { Identity newFact = new Identity(memento); // Create a memory stream from the memento data. using (MemoryStream data = new MemoryStream(memento.Data)) { using (BinaryReader output = new BinaryReader(data)) { newFact._anonymousId = (string)_fieldSerializerByType[typeof(string)].ReadData(output); } } return newFact; }
public void Initialize() { var sharedCommunication = new MemoryCommunicationStrategy(); _mikesCommunity = new Community(new MemoryStorageStrategy()) .AddCommunicationStrategy(sharedCommunication) .Register<Model.CorrespondenceModel>() .Subscribe(() => _mikesIdentity) .Subscribe(() => _mikesIdentity.SharedClouds) ; _russellsCommunity = new Community(new MemoryStorageStrategy()) .AddCommunicationStrategy(sharedCommunication) .Register<Model.CorrespondenceModel>() .Subscribe(() => _russellsIdentity) .Subscribe(() => _russellsIdentity.SharedClouds) ; _mikesIdentity = _mikesCommunity.AddFact(new Identity("mike")); _russellsIdentity = _russellsCommunity.AddFact(new Identity("russell")); }
public HomeViewModel(Identity identity, NavigationModel navigation) { _identity = identity; _navigation = navigation; }
// Fields // Results // Business constructor public DisableToastNotification( Identity identity ) { _unique = Guid.NewGuid(); InitializeResults(); _identity = new PredecessorObj<Identity>(this, RoleIdentity, identity); }
// Fields // Results // Business constructor public Share( Identity recipient ,Cloud cloud ) { InitializeResults(); _recipient = new PredecessorObj<Identity>(this, RoleRecipient, recipient); _cloud = new PredecessorObj<Cloud>(this, RoleCloud, cloud); }
// Business constructor public Cloud( Identity creator ) { _unique = Guid.NewGuid(); InitializeResults(); _creator = new PredecessorObj<Identity>(this, RoleCreator, creator); }