コード例 #1
0
            public CorrespondenceFact CreateFact(FactMemento memento)
            {
                DisableToastNotification newFact = new DisableToastNotification(memento);

                // Create a memory stream from the memento data.
                using (MemoryStream data = new MemoryStream(memento.Data))
                {
                    using (BinaryReader output = new BinaryReader(data))
                    {
                        newFact._unique = (Guid)_fieldSerializerByType[typeof(Guid)].ReadData(output);
                    }
                }

                return(newFact);
            }
コード例 #2
0
            public void WriteFactData(CorrespondenceFact obj, BinaryWriter output)
            {
                DisableToastNotification fact = (DisableToastNotification)obj;

                _fieldSerializerByType[typeof(Guid)].WriteData(output, fact._unique);
            }
コード例 #3
0
			public CorrespondenceFact CreateFact(FactMemento memento)
			{
				DisableToastNotification newFact = new DisableToastNotification(memento);

				// Create a memory stream from the memento data.
				using (MemoryStream data = new MemoryStream(memento.Data))
				{
					using (BinaryReader output = new BinaryReader(data))
					{
						newFact._unique = (Guid)_fieldSerializerByType[typeof(Guid)].ReadData(output);
					}
				}

				return newFact;
			}