Home

What am I missing here?

edited October 2015
I must be missing something: why doesn't obs.DumpLatest() update in place here, when you click on the "Update" hyperlinq at the top?
void Main()
{
	var xd = XDocument.Parse(@"<root><item last-updated=''/></root>");
	
	new Hyperlinq(() => xd.Root.Element("item").Attribute("last-updated").Value = $"{DateTime.Now:HH:mm:ss.fff}", "Update").Dump();

	var obs = Observable.FromEventPattern<XObjectChangeEventArgs>(
				h => xd.Changed += h,
				h => xd.Changed -= h
				).Select(e => ((XObject)e.Sender).Document.Dump("The updated document"));
				
	obs.DumpLatest("Why does this update only once?");
}

Comments

Sign In or Register to comment.