Example #1
0
 private async Task CreateIndividualsAsync()
 {
     _individualFlynn = await _communityFlynn.AddFactAsync(
         new Individual("flynn"));
     _individualAlan = await _communityAlan.AddFactAsync(
         new Individual("alan"));
 }
 public MainViewModel(
     Individual individual, 
     SynchronizationService synhronizationService, 
     MessageBoardSelectionModel selection)
 {
     _individual = individual;
     _synchronizationService = synhronizationService;
     _selection = selection;
 }
 private void CreateIndividualDesignData()
 {
     Community.Perform(async delegate
     {
         var individual = await _community.AddFactAsync(new Individual("design"));
         var first = await individual.JoinMessageBoardAsync("Correspondence");
         first.MessageBoard.SendMessage("First Message");
         first.MessageBoard.SendMessage("Second Message");
         var second = await individual.JoinMessageBoardAsync("Azure");
         second.MessageBoard.SendMessage("Another Message");
         second.MessageBoard.SendMessage("Final Message");
         Individual = individual;
     });
 }
 private void CreateIndividual(HTTPConfigurationProvider http)
 {
     Community.Perform(async delegate
     {
         Individual individual = await _community.LoadFactAsync<Individual>(ThisIndividual);
         if (individual == null)
         {
             string randomId = Punctuation.Replace(Guid.NewGuid().ToString(), String.Empty).ToLower();
             individual = await _community.AddFactAsync(new Individual(randomId));
             await _community.SetFactAsync(ThisIndividual, individual);
         }
         Individual = individual;
         http.Individual = individual;
     });
 }
 private void CreateIndividual(HTTPConfigurationProvider http)
 {
     Community.Perform(async delegate
     {
         var individual = await _community.AddFactAsync(new Individual(GetAnonymousUserId()));
         Individual = individual;
         http.Individual = individual;
     });
 }
 public MainViewModel(Community community, Individual individual, MessageBoardSelectionModel selection)
 {
     _community = community;
     _individual = individual;
     _selection = selection;
 }
            public CorrespondenceFact CreateFact(FactMemento memento)
            {
                Individual newFact = new Individual(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;
            }
 // Fields
 // Results
 // Business constructor
 public EnableToastNotification(
     Individual individual
     )
 {
     _unique = Guid.NewGuid();
     InitializeResults();
     _individual = new PredecessorObj<Individual>(this, GetRoleIndividual(), individual);
 }
 // Fields
 // Results
 // Business constructor
 public Share(
     Individual individual
     ,MessageBoard messageBoard
     )
 {
     _unique = Guid.NewGuid();
     InitializeResults();
     _individual = new PredecessorObj<Individual>(this, GetRoleIndividual(), individual);
     _messageBoard = new PredecessorObj<MessageBoard>(this, GetRoleMessageBoard(), messageBoard);
 }
 public SettingsViewModel(Individual individual)
 {
     _individual = individual;
 }
 public JoinMessageBoardViewModel(MessageBoardSelectionModel selection, Individual individual)
 {
     _selection = selection;
     _individual = individual;
 }