private void CreateIndividual()
 {
     _individual = _community.LoadFact<Individual>(ThisIndividual);
     if (_individual == null)
     {
         string randomId = Punctuation.Replace(Guid.NewGuid().ToString(), String.Empty).ToLower();
         _individual = _community.AddFact(new Individual(randomId));
         _community.SetFact(ThisIndividual, _individual);
     }
 }
 private void CreateIndidualDesignData()
 {
     var individual = _community.AddFact(new Individual("design"));
     _individual = individual;
 }
            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;
            }
Example #4
0
 public CorrespondenceFact GetNullInstance()
 {
     return(Individual.GetNullInstance());
 }
Example #5
0
 public CorrespondenceFact GetUnloadedInstance()
 {
     return(Individual.GetUnloadedInstance());
 }
Example #6
0
            public void WriteFactData(CorrespondenceFact obj, BinaryWriter output)
            {
                Individual fact = (Individual)obj;

                _fieldSerializerByType[typeof(string)].WriteData(output, fact._anonymousId);
            }