Beispiel #1
0
		public void DoSomehow_WorksDuringPropChanged()
		{
			m_actionHandler.EndUndoTask();
			var propChangeHandler = new PropChangedImplementor() {Parent = this};
			Cache.DomainDataByFlid.AddNotification(propChangeHandler);
			ILexEntry entry = null;
			NonUndoableUnitOfWorkHelper.Do(m_actionHandler, () => { entry = MakeEntry("an entry"); }); // new object, no PropChanged sent
			NonUndoableUnitOfWorkHelper.Do(m_actionHandler,
				() =>
					entry.LexemeFormOA.Form.VernacularDefaultWritingSystem =
						Cache.TsStrFactory.MakeString("changed", Cache.DefaultVernWs)); // triggers PropChanged, which triggers another UOW
			Assert.That(propChangeHandler.Entry, Is.Not.Null);
		}
Beispiel #2
0
        public void DoSomehow_WorksDuringPropChanged()
        {
            m_actionHandler.EndUndoTask();
            var propChangeHandler = new PropChangedImplementor()
            {
                Parent = this
            };

            Cache.DomainDataByFlid.AddNotification(propChangeHandler);
            ILexEntry entry = null;

            NonUndoableUnitOfWorkHelper.Do(m_actionHandler, () => { entry = MakeEntry("an entry"); });             // new object, no PropChanged sent
            NonUndoableUnitOfWorkHelper.Do(m_actionHandler,
                                           () =>
                                           entry.LexemeFormOA.Form.VernacularDefaultWritingSystem =
                                               Cache.TsStrFactory.MakeString("changed", Cache.DefaultVernWs));  // triggers PropChanged, which triggers another UOW
            Assert.That(propChangeHandler.Entry, Is.Not.Null);
        }