<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>Obtics Work Item Rss Feed</title><link>http://www.codeplex.com/Obtics/WorkItem/List.aspx</link><description>Obtics Work Item Rss Description</description><item><title>Commented Issue: Multithreading &amp; DependencyObject [5483]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5483</link><description>I&amp;#39;ve come across an implementation problem with using Obtics on a background thread with a DependencyObject on the UI thread and am wondering if you&amp;#39;ve come across it and how you think it should be handled.&lt;br /&gt;&lt;br /&gt;I have a property that is computed using Obtics on a separate thread.  At some point after a change event occurs on an object used in the Obtics expression, the expression needs to use the UI&amp;#39;s Dispatcher to get to the UI thread &amp;#40;e.g. to get and set a DependencyProperty value&amp;#41;.&lt;br /&gt;The problem I have is that every way I&amp;#39;ve tried to do this &amp;#42;after&amp;#42; the change event occurs, Obtics is stuck on the Main thread in a lock and so the background thread can&amp;#39;t use the main thread to do its thing.  Here is a partial stack trace of the Main thread and the background thread.  On the main thread, Obtics is stuck in a sleep loop waiting for some flag to be set and the background thread is stuck waiting for the Main thread to be free for use&amp;#58;&lt;br /&gt;&amp;#62;&amp;#9;Obtics.dll&amp;#33;Obtics.ObservableObjectBase.Lock&amp;#40;&amp;#41; Line 113 &amp;#43; 0x7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.CollectionChanged.add&amp;#40;System.Collections.Specialized.NotifyCollectionChangedEventHandler value &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;&amp;#41; Line 167 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionView.CollectionView&amp;#40;System.Collections.IEnumerable collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, int moveToFirst &amp;#61; -1&amp;#41; &amp;#43; 0x12b bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.EnumerableCollectionView.EnumerableCollectionView&amp;#40;System.Collections.IEnumerable source &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; &amp;#43; 0x15 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.ViewManager.GetViewRecord&amp;#40;object collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.Windows.Data.CollectionViewSource cvs &amp;#61; &amp;#123;System.Windows.Data.CollectionViewSource&amp;#125;, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x12c bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.GetViewRecord&amp;#40;object collection, System.Windows.Data.CollectionViewSource key, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x1f bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, bool createView&amp;#41; &amp;#43; 0x43 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, System.Windows.DependencyObject d &amp;#61; &amp;#123;System.Windows.Controls.ListBox&amp;#125;&amp;#41; &amp;#43; 0x28 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemCollection.SetItemsSource&amp;#40;System.Collections.IEnumerable value&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemsControl.OnItemsSourceChanged&amp;#40;System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0xad bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.FrameworkElement.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x50 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.NotifyPropertyChange&amp;#40;System.Windows.DependencyPropertyChangedEventArgs args&amp;#41; &amp;#43; 0x2c bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.UpdateEffectiveValue&amp;#40;System.Windows.EntryIndex entryIndex &amp;#61; &amp;#123;System.Windows.EntryIndex&amp;#125;, System.Windows.DependencyProperty dp &amp;#61; &amp;#123;System.Windows.DependencyProperty&amp;#125;, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry &amp;#61; &amp;#123;System.Windows.EffectiveValueEntry&amp;#125;, bool coerceWithDeferredReference, System.Windows.OperationType operationType&amp;#41; &amp;#43; 0x515 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.InvalidateProperty&amp;#40;System.Windows.DependencyProperty dp&amp;#41; &amp;#43; 0xa2 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Invalidate&amp;#40;bool isASubPropertyChange&amp;#41; &amp;#43; 0x60 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.TransferValue&amp;#40;object newValue, bool isASubPropertyChange&amp;#41; &amp;#43; 0x1c4 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Activate&amp;#40;object item&amp;#41; &amp;#43; 0xe7 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.AttachToContext&amp;#40;System.Windows.Data.BindingExpression.AttachAttempt attempt&amp;#41; &amp;#43; 0x1de bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext&amp;#40;bool lastChance&amp;#41; &amp;#43; 0x19 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Task.Run&amp;#40;bool lastChance &amp;#61; false&amp;#41; &amp;#43; 0x31 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Run&amp;#40;object arg&amp;#41; &amp;#43; 0xb7 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.InternalRealCall&amp;#40;System.Delegate callback &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;, object args &amp;#61; false, bool isSingleParameter &amp;#61; true&amp;#41; &amp;#43; 0x8a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.TryCatchWhen&amp;#40;object source &amp;#61; &amp;#123;System.Windows.Threading.Dispatcher&amp;#125;, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler &amp;#61; null&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.WrappedInvoke&amp;#40;System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler&amp;#41; &amp;#43; 0x44 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeImpl&amp;#40;&amp;#41; &amp;#43; 0x5d bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext&amp;#40;object state&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;mscorlib.dll&amp;#33;System.Threading.ExecutionContext.runTryCode&amp;#40;object userData&amp;#41; &amp;#43; 0x51 bytes&amp;#9;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And then here is where the background thread is deadlocked waiting for the Main thread&amp;#58;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.Invoke&amp;#40;System.Delegate method, object&amp;#91;&amp;#93; args&amp;#41; &amp;#43; 0x3f bytes&amp;#9;&lt;br /&gt;&lt;br /&gt; &amp;#9;&amp;#91;Lightweight Function&amp;#93;&amp;#9;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.ConvertValue&amp;#40;CompasBiz.Scheduling.User value &amp;#61; &amp;#123;CompasBiz.Scheduling.User&amp;#125;&amp;#41; Line 40 &amp;#43; 0x1a bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformationBase&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,Obtics.Tuple&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,System.Func&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.ConvertEnumerator.MoveNext&amp;#40;&amp;#41; Line 23 &amp;#43; 0x73 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.VersionedEnumerator.EnumeratorWrapper&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.MoveNext&amp;#40;&amp;#41; Line 57 &amp;#43; 0xd bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 73 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.UpdateHaveChangedListeningClients&amp;#40;bool newValue &amp;#61; true, bool oldValue &amp;#61; false&amp;#41; Line 174 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.HaveChangedListeningClients.set&amp;#40;bool value &amp;#61; true&amp;#41; Line 101 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.SubscribeINC&amp;#40;Obtics.IReceiveChangeNotification receiver &amp;#61; Count &amp;#61; Cannot evaluate expression because the current thread is in a sleep, wait, or join&amp;#41; Line 157 &amp;#43; 0x28 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 67 &amp;#43; 0xc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.ResultInformationExposed&amp;#40;&amp;#41; Line 180 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 88 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.System.Collections.Generic.IEnumerable&amp;#60;TOut&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 45 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;System.Core.dll&amp;#33;System.Linq.Enumerable.Count&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; source&amp;#41; &amp;#43; 0xb2 bytes&amp;#9;&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.InitializeDefaults&amp;#40;&amp;#41; Line 480 &amp;#43; 0x1a bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.OnUsersWithSchedulesCollectionChanged&amp;#40;Object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;, System.Collections.Specialized.NotifyCollectionChangedEventArgs e &amp;#61; &amp;#123;Obtics.Collections.OrderedNotifyCollectionChangedEventArgs&amp;#125;&amp;#41; Line 341 &amp;#43; 0xa bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCToNCC.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs changeArgs &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 150 &amp;#43; 0x20 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.OpaqueTransformationBase&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 106 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;object rawMessage &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 187 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Values.Transformations.NPCToNCBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.npc_PropertyChanged&amp;#40;object sender &amp;#61; &amp;#123;Npipm.AsyncValueProvider&amp;#60;Npipm.Compas.ViewModels.MainViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.ComponentModel.PropertyChangedEventArgs e &amp;#61; &amp;#123;System.ComponentModel.PropertyChangedEventArgs&amp;#125;&amp;#41; Line 29 &amp;#43; 0xcc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 26 &amp;#43; 0x3c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ObjectModel.DispatcherNotifiedObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 31 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#40;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41; expression &amp;#61; &amp;#123;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 38 &amp;#43; 0x5c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ValueProviderBaseBase&amp;#40;Of T&amp;#41;.NotifyValueChanged&amp;#40;&amp;#41; Line 27 &amp;#43; 0x1cc bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AttachedValueProviderBase&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 98 &amp;#43; 0x8 bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 66 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.LoadAsyncValue&amp;#40;&amp;#41; Line 84 &amp;#43; 0x68 bytes&amp;#9;Basic&lt;br /&gt;&lt;br /&gt;The only working solution I&amp;#39;ve found so far is to Dispatch the INotifyPropertyChanged event, itself, to the Main thread, so that &amp;#42;all&amp;#42; Obtics code runs on the Main thread instead of the background thread.  But this defeats most of the advantages of having another thread at all, since most of the processing still occurs on the Main thread.&lt;br /&gt;&lt;br /&gt;So to simplify my question&amp;#58; I basically want to know the best way to use Obtics on a non-UI thread that needs to access the UI thread in mid-expression.&lt;br /&gt;</description><author>Throb</author><pubDate>Sat, 21 Nov 2009 16:34:51 GMT</pubDate><guid isPermaLink="false">Commented Issue: Multithreading &amp; DependencyObject [5483] 20091121043451P</guid></item><item><title>Commented Issue: Multithreading &amp; DependencyObject [5483]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5483</link><description>I&amp;#39;ve come across an implementation problem with using Obtics on a background thread with a DependencyObject on the UI thread and am wondering if you&amp;#39;ve come across it and how you think it should be handled.&lt;br /&gt;&lt;br /&gt;I have a property that is computed using Obtics on a separate thread.  At some point after a change event occurs on an object used in the Obtics expression, the expression needs to use the UI&amp;#39;s Dispatcher to get to the UI thread &amp;#40;e.g. to get and set a DependencyProperty value&amp;#41;.&lt;br /&gt;The problem I have is that every way I&amp;#39;ve tried to do this &amp;#42;after&amp;#42; the change event occurs, Obtics is stuck on the Main thread in a lock and so the background thread can&amp;#39;t use the main thread to do its thing.  Here is a partial stack trace of the Main thread and the background thread.  On the main thread, Obtics is stuck in a sleep loop waiting for some flag to be set and the background thread is stuck waiting for the Main thread to be free for use&amp;#58;&lt;br /&gt;&amp;#62;&amp;#9;Obtics.dll&amp;#33;Obtics.ObservableObjectBase.Lock&amp;#40;&amp;#41; Line 113 &amp;#43; 0x7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.CollectionChanged.add&amp;#40;System.Collections.Specialized.NotifyCollectionChangedEventHandler value &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;&amp;#41; Line 167 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionView.CollectionView&amp;#40;System.Collections.IEnumerable collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, int moveToFirst &amp;#61; -1&amp;#41; &amp;#43; 0x12b bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.EnumerableCollectionView.EnumerableCollectionView&amp;#40;System.Collections.IEnumerable source &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; &amp;#43; 0x15 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.ViewManager.GetViewRecord&amp;#40;object collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.Windows.Data.CollectionViewSource cvs &amp;#61; &amp;#123;System.Windows.Data.CollectionViewSource&amp;#125;, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x12c bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.GetViewRecord&amp;#40;object collection, System.Windows.Data.CollectionViewSource key, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x1f bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, bool createView&amp;#41; &amp;#43; 0x43 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, System.Windows.DependencyObject d &amp;#61; &amp;#123;System.Windows.Controls.ListBox&amp;#125;&amp;#41; &amp;#43; 0x28 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemCollection.SetItemsSource&amp;#40;System.Collections.IEnumerable value&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemsControl.OnItemsSourceChanged&amp;#40;System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0xad bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.FrameworkElement.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x50 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.NotifyPropertyChange&amp;#40;System.Windows.DependencyPropertyChangedEventArgs args&amp;#41; &amp;#43; 0x2c bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.UpdateEffectiveValue&amp;#40;System.Windows.EntryIndex entryIndex &amp;#61; &amp;#123;System.Windows.EntryIndex&amp;#125;, System.Windows.DependencyProperty dp &amp;#61; &amp;#123;System.Windows.DependencyProperty&amp;#125;, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry &amp;#61; &amp;#123;System.Windows.EffectiveValueEntry&amp;#125;, bool coerceWithDeferredReference, System.Windows.OperationType operationType&amp;#41; &amp;#43; 0x515 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.InvalidateProperty&amp;#40;System.Windows.DependencyProperty dp&amp;#41; &amp;#43; 0xa2 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Invalidate&amp;#40;bool isASubPropertyChange&amp;#41; &amp;#43; 0x60 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.TransferValue&amp;#40;object newValue, bool isASubPropertyChange&amp;#41; &amp;#43; 0x1c4 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Activate&amp;#40;object item&amp;#41; &amp;#43; 0xe7 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.AttachToContext&amp;#40;System.Windows.Data.BindingExpression.AttachAttempt attempt&amp;#41; &amp;#43; 0x1de bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext&amp;#40;bool lastChance&amp;#41; &amp;#43; 0x19 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Task.Run&amp;#40;bool lastChance &amp;#61; false&amp;#41; &amp;#43; 0x31 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Run&amp;#40;object arg&amp;#41; &amp;#43; 0xb7 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.InternalRealCall&amp;#40;System.Delegate callback &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;, object args &amp;#61; false, bool isSingleParameter &amp;#61; true&amp;#41; &amp;#43; 0x8a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.TryCatchWhen&amp;#40;object source &amp;#61; &amp;#123;System.Windows.Threading.Dispatcher&amp;#125;, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler &amp;#61; null&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.WrappedInvoke&amp;#40;System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler&amp;#41; &amp;#43; 0x44 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeImpl&amp;#40;&amp;#41; &amp;#43; 0x5d bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext&amp;#40;object state&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;mscorlib.dll&amp;#33;System.Threading.ExecutionContext.runTryCode&amp;#40;object userData&amp;#41; &amp;#43; 0x51 bytes&amp;#9;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And then here is where the background thread is deadlocked waiting for the Main thread&amp;#58;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.Invoke&amp;#40;System.Delegate method, object&amp;#91;&amp;#93; args&amp;#41; &amp;#43; 0x3f bytes&amp;#9;&lt;br /&gt;&lt;br /&gt; &amp;#9;&amp;#91;Lightweight Function&amp;#93;&amp;#9;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.ConvertValue&amp;#40;CompasBiz.Scheduling.User value &amp;#61; &amp;#123;CompasBiz.Scheduling.User&amp;#125;&amp;#41; Line 40 &amp;#43; 0x1a bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformationBase&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,Obtics.Tuple&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,System.Func&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.ConvertEnumerator.MoveNext&amp;#40;&amp;#41; Line 23 &amp;#43; 0x73 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.VersionedEnumerator.EnumeratorWrapper&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.MoveNext&amp;#40;&amp;#41; Line 57 &amp;#43; 0xd bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 73 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.UpdateHaveChangedListeningClients&amp;#40;bool newValue &amp;#61; true, bool oldValue &amp;#61; false&amp;#41; Line 174 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.HaveChangedListeningClients.set&amp;#40;bool value &amp;#61; true&amp;#41; Line 101 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.SubscribeINC&amp;#40;Obtics.IReceiveChangeNotification receiver &amp;#61; Count &amp;#61; Cannot evaluate expression because the current thread is in a sleep, wait, or join&amp;#41; Line 157 &amp;#43; 0x28 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 67 &amp;#43; 0xc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.ResultInformationExposed&amp;#40;&amp;#41; Line 180 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 88 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.System.Collections.Generic.IEnumerable&amp;#60;TOut&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 45 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;System.Core.dll&amp;#33;System.Linq.Enumerable.Count&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; source&amp;#41; &amp;#43; 0xb2 bytes&amp;#9;&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.InitializeDefaults&amp;#40;&amp;#41; Line 480 &amp;#43; 0x1a bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.OnUsersWithSchedulesCollectionChanged&amp;#40;Object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;, System.Collections.Specialized.NotifyCollectionChangedEventArgs e &amp;#61; &amp;#123;Obtics.Collections.OrderedNotifyCollectionChangedEventArgs&amp;#125;&amp;#41; Line 341 &amp;#43; 0xa bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCToNCC.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs changeArgs &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 150 &amp;#43; 0x20 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.OpaqueTransformationBase&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 106 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;object rawMessage &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 187 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Values.Transformations.NPCToNCBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.npc_PropertyChanged&amp;#40;object sender &amp;#61; &amp;#123;Npipm.AsyncValueProvider&amp;#60;Npipm.Compas.ViewModels.MainViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.ComponentModel.PropertyChangedEventArgs e &amp;#61; &amp;#123;System.ComponentModel.PropertyChangedEventArgs&amp;#125;&amp;#41; Line 29 &amp;#43; 0xcc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 26 &amp;#43; 0x3c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ObjectModel.DispatcherNotifiedObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 31 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#40;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41; expression &amp;#61; &amp;#123;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 38 &amp;#43; 0x5c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ValueProviderBaseBase&amp;#40;Of T&amp;#41;.NotifyValueChanged&amp;#40;&amp;#41; Line 27 &amp;#43; 0x1cc bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AttachedValueProviderBase&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 98 &amp;#43; 0x8 bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 66 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.LoadAsyncValue&amp;#40;&amp;#41; Line 84 &amp;#43; 0x68 bytes&amp;#9;Basic&lt;br /&gt;&lt;br /&gt;The only working solution I&amp;#39;ve found so far is to Dispatch the INotifyPropertyChanged event, itself, to the Main thread, so that &amp;#42;all&amp;#42; Obtics code runs on the Main thread instead of the background thread.  But this defeats most of the advantages of having another thread at all, since most of the processing still occurs on the Main thread.&lt;br /&gt;&lt;br /&gt;So to simplify my question&amp;#58; I basically want to know the best way to use Obtics on a non-UI thread that needs to access the UI thread in mid-expression.&lt;br /&gt;</description><author>joshmouch</author><pubDate>Sat, 21 Nov 2009 05:10:53 GMT</pubDate><guid isPermaLink="false">Commented Issue: Multithreading &amp; DependencyObject [5483] 20091121051053A</guid></item><item><title>Commented Issue: Multithreading &amp; DependencyObject [5483]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5483</link><description>I&amp;#39;ve come across an implementation problem with using Obtics on a background thread with a DependencyObject on the UI thread and am wondering if you&amp;#39;ve come across it and how you think it should be handled.&lt;br /&gt;&lt;br /&gt;I have a property that is computed using Obtics on a separate thread.  At some point after a change event occurs on an object used in the Obtics expression, the expression needs to use the UI&amp;#39;s Dispatcher to get to the UI thread &amp;#40;e.g. to get and set a DependencyProperty value&amp;#41;.&lt;br /&gt;The problem I have is that every way I&amp;#39;ve tried to do this &amp;#42;after&amp;#42; the change event occurs, Obtics is stuck on the Main thread in a lock and so the background thread can&amp;#39;t use the main thread to do its thing.  Here is a partial stack trace of the Main thread and the background thread.  On the main thread, Obtics is stuck in a sleep loop waiting for some flag to be set and the background thread is stuck waiting for the Main thread to be free for use&amp;#58;&lt;br /&gt;&amp;#62;&amp;#9;Obtics.dll&amp;#33;Obtics.ObservableObjectBase.Lock&amp;#40;&amp;#41; Line 113 &amp;#43; 0x7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.CollectionChanged.add&amp;#40;System.Collections.Specialized.NotifyCollectionChangedEventHandler value &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;&amp;#41; Line 167 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionView.CollectionView&amp;#40;System.Collections.IEnumerable collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, int moveToFirst &amp;#61; -1&amp;#41; &amp;#43; 0x12b bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.EnumerableCollectionView.EnumerableCollectionView&amp;#40;System.Collections.IEnumerable source &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; &amp;#43; 0x15 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.ViewManager.GetViewRecord&amp;#40;object collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.Windows.Data.CollectionViewSource cvs &amp;#61; &amp;#123;System.Windows.Data.CollectionViewSource&amp;#125;, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x12c bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.GetViewRecord&amp;#40;object collection, System.Windows.Data.CollectionViewSource key, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x1f bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, bool createView&amp;#41; &amp;#43; 0x43 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, System.Windows.DependencyObject d &amp;#61; &amp;#123;System.Windows.Controls.ListBox&amp;#125;&amp;#41; &amp;#43; 0x28 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemCollection.SetItemsSource&amp;#40;System.Collections.IEnumerable value&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemsControl.OnItemsSourceChanged&amp;#40;System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0xad bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.FrameworkElement.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x50 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.NotifyPropertyChange&amp;#40;System.Windows.DependencyPropertyChangedEventArgs args&amp;#41; &amp;#43; 0x2c bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.UpdateEffectiveValue&amp;#40;System.Windows.EntryIndex entryIndex &amp;#61; &amp;#123;System.Windows.EntryIndex&amp;#125;, System.Windows.DependencyProperty dp &amp;#61; &amp;#123;System.Windows.DependencyProperty&amp;#125;, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry &amp;#61; &amp;#123;System.Windows.EffectiveValueEntry&amp;#125;, bool coerceWithDeferredReference, System.Windows.OperationType operationType&amp;#41; &amp;#43; 0x515 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.InvalidateProperty&amp;#40;System.Windows.DependencyProperty dp&amp;#41; &amp;#43; 0xa2 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Invalidate&amp;#40;bool isASubPropertyChange&amp;#41; &amp;#43; 0x60 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.TransferValue&amp;#40;object newValue, bool isASubPropertyChange&amp;#41; &amp;#43; 0x1c4 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Activate&amp;#40;object item&amp;#41; &amp;#43; 0xe7 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.AttachToContext&amp;#40;System.Windows.Data.BindingExpression.AttachAttempt attempt&amp;#41; &amp;#43; 0x1de bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext&amp;#40;bool lastChance&amp;#41; &amp;#43; 0x19 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Task.Run&amp;#40;bool lastChance &amp;#61; false&amp;#41; &amp;#43; 0x31 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Run&amp;#40;object arg&amp;#41; &amp;#43; 0xb7 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.InternalRealCall&amp;#40;System.Delegate callback &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;, object args &amp;#61; false, bool isSingleParameter &amp;#61; true&amp;#41; &amp;#43; 0x8a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.TryCatchWhen&amp;#40;object source &amp;#61; &amp;#123;System.Windows.Threading.Dispatcher&amp;#125;, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler &amp;#61; null&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.WrappedInvoke&amp;#40;System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler&amp;#41; &amp;#43; 0x44 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeImpl&amp;#40;&amp;#41; &amp;#43; 0x5d bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext&amp;#40;object state&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;mscorlib.dll&amp;#33;System.Threading.ExecutionContext.runTryCode&amp;#40;object userData&amp;#41; &amp;#43; 0x51 bytes&amp;#9;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And then here is where the background thread is deadlocked waiting for the Main thread&amp;#58;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.Invoke&amp;#40;System.Delegate method, object&amp;#91;&amp;#93; args&amp;#41; &amp;#43; 0x3f bytes&amp;#9;&lt;br /&gt;&lt;br /&gt; &amp;#9;&amp;#91;Lightweight Function&amp;#93;&amp;#9;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.ConvertValue&amp;#40;CompasBiz.Scheduling.User value &amp;#61; &amp;#123;CompasBiz.Scheduling.User&amp;#125;&amp;#41; Line 40 &amp;#43; 0x1a bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformationBase&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,Obtics.Tuple&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,System.Func&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.ConvertEnumerator.MoveNext&amp;#40;&amp;#41; Line 23 &amp;#43; 0x73 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.VersionedEnumerator.EnumeratorWrapper&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.MoveNext&amp;#40;&amp;#41; Line 57 &amp;#43; 0xd bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 73 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.UpdateHaveChangedListeningClients&amp;#40;bool newValue &amp;#61; true, bool oldValue &amp;#61; false&amp;#41; Line 174 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.HaveChangedListeningClients.set&amp;#40;bool value &amp;#61; true&amp;#41; Line 101 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.SubscribeINC&amp;#40;Obtics.IReceiveChangeNotification receiver &amp;#61; Count &amp;#61; Cannot evaluate expression because the current thread is in a sleep, wait, or join&amp;#41; Line 157 &amp;#43; 0x28 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 67 &amp;#43; 0xc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.ResultInformationExposed&amp;#40;&amp;#41; Line 180 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 88 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.System.Collections.Generic.IEnumerable&amp;#60;TOut&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 45 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;System.Core.dll&amp;#33;System.Linq.Enumerable.Count&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; source&amp;#41; &amp;#43; 0xb2 bytes&amp;#9;&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.InitializeDefaults&amp;#40;&amp;#41; Line 480 &amp;#43; 0x1a bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.OnUsersWithSchedulesCollectionChanged&amp;#40;Object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;, System.Collections.Specialized.NotifyCollectionChangedEventArgs e &amp;#61; &amp;#123;Obtics.Collections.OrderedNotifyCollectionChangedEventArgs&amp;#125;&amp;#41; Line 341 &amp;#43; 0xa bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCToNCC.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs changeArgs &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 150 &amp;#43; 0x20 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.OpaqueTransformationBase&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 106 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;object rawMessage &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 187 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Values.Transformations.NPCToNCBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.npc_PropertyChanged&amp;#40;object sender &amp;#61; &amp;#123;Npipm.AsyncValueProvider&amp;#60;Npipm.Compas.ViewModels.MainViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.ComponentModel.PropertyChangedEventArgs e &amp;#61; &amp;#123;System.ComponentModel.PropertyChangedEventArgs&amp;#125;&amp;#41; Line 29 &amp;#43; 0xcc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 26 &amp;#43; 0x3c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ObjectModel.DispatcherNotifiedObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 31 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#40;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41; expression &amp;#61; &amp;#123;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 38 &amp;#43; 0x5c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ValueProviderBaseBase&amp;#40;Of T&amp;#41;.NotifyValueChanged&amp;#40;&amp;#41; Line 27 &amp;#43; 0x1cc bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AttachedValueProviderBase&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 98 &amp;#43; 0x8 bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 66 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.LoadAsyncValue&amp;#40;&amp;#41; Line 84 &amp;#43; 0x68 bytes&amp;#9;Basic&lt;br /&gt;&lt;br /&gt;The only working solution I&amp;#39;ve found so far is to Dispatch the INotifyPropertyChanged event, itself, to the Main thread, so that &amp;#42;all&amp;#42; Obtics code runs on the Main thread instead of the background thread.  But this defeats most of the advantages of having another thread at all, since most of the processing still occurs on the Main thread.&lt;br /&gt;&lt;br /&gt;So to simplify my question&amp;#58; I basically want to know the best way to use Obtics on a non-UI thread that needs to access the UI thread in mid-expression.&lt;br /&gt;</description><author>joshmouch</author><pubDate>Sat, 21 Nov 2009 01:02:14 GMT</pubDate><guid isPermaLink="false">Commented Issue: Multithreading &amp; DependencyObject [5483] 20091121010214A</guid></item><item><title>Commented Issue: Multithreading &amp; DependencyObject [5483]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5483</link><description>I&amp;#39;ve come across an implementation problem with using Obtics on a background thread with a DependencyObject on the UI thread and am wondering if you&amp;#39;ve come across it and how you think it should be handled.&lt;br /&gt;&lt;br /&gt;I have a property that is computed using Obtics on a separate thread.  At some point after a change event occurs on an object used in the Obtics expression, the expression needs to use the UI&amp;#39;s Dispatcher to get to the UI thread &amp;#40;e.g. to get and set a DependencyProperty value&amp;#41;.&lt;br /&gt;The problem I have is that every way I&amp;#39;ve tried to do this &amp;#42;after&amp;#42; the change event occurs, Obtics is stuck on the Main thread in a lock and so the background thread can&amp;#39;t use the main thread to do its thing.  Here is a partial stack trace of the Main thread and the background thread.  On the main thread, Obtics is stuck in a sleep loop waiting for some flag to be set and the background thread is stuck waiting for the Main thread to be free for use&amp;#58;&lt;br /&gt;&amp;#62;&amp;#9;Obtics.dll&amp;#33;Obtics.ObservableObjectBase.Lock&amp;#40;&amp;#41; Line 113 &amp;#43; 0x7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.CollectionChanged.add&amp;#40;System.Collections.Specialized.NotifyCollectionChangedEventHandler value &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;&amp;#41; Line 167 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionView.CollectionView&amp;#40;System.Collections.IEnumerable collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, int moveToFirst &amp;#61; -1&amp;#41; &amp;#43; 0x12b bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.EnumerableCollectionView.EnumerableCollectionView&amp;#40;System.Collections.IEnumerable source &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; &amp;#43; 0x15 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.ViewManager.GetViewRecord&amp;#40;object collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.Windows.Data.CollectionViewSource cvs &amp;#61; &amp;#123;System.Windows.Data.CollectionViewSource&amp;#125;, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x12c bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.GetViewRecord&amp;#40;object collection, System.Windows.Data.CollectionViewSource key, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x1f bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, bool createView&amp;#41; &amp;#43; 0x43 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, System.Windows.DependencyObject d &amp;#61; &amp;#123;System.Windows.Controls.ListBox&amp;#125;&amp;#41; &amp;#43; 0x28 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemCollection.SetItemsSource&amp;#40;System.Collections.IEnumerable value&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemsControl.OnItemsSourceChanged&amp;#40;System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0xad bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.FrameworkElement.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x50 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.NotifyPropertyChange&amp;#40;System.Windows.DependencyPropertyChangedEventArgs args&amp;#41; &amp;#43; 0x2c bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.UpdateEffectiveValue&amp;#40;System.Windows.EntryIndex entryIndex &amp;#61; &amp;#123;System.Windows.EntryIndex&amp;#125;, System.Windows.DependencyProperty dp &amp;#61; &amp;#123;System.Windows.DependencyProperty&amp;#125;, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry &amp;#61; &amp;#123;System.Windows.EffectiveValueEntry&amp;#125;, bool coerceWithDeferredReference, System.Windows.OperationType operationType&amp;#41; &amp;#43; 0x515 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.InvalidateProperty&amp;#40;System.Windows.DependencyProperty dp&amp;#41; &amp;#43; 0xa2 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Invalidate&amp;#40;bool isASubPropertyChange&amp;#41; &amp;#43; 0x60 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.TransferValue&amp;#40;object newValue, bool isASubPropertyChange&amp;#41; &amp;#43; 0x1c4 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Activate&amp;#40;object item&amp;#41; &amp;#43; 0xe7 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.AttachToContext&amp;#40;System.Windows.Data.BindingExpression.AttachAttempt attempt&amp;#41; &amp;#43; 0x1de bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext&amp;#40;bool lastChance&amp;#41; &amp;#43; 0x19 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Task.Run&amp;#40;bool lastChance &amp;#61; false&amp;#41; &amp;#43; 0x31 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Run&amp;#40;object arg&amp;#41; &amp;#43; 0xb7 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.InternalRealCall&amp;#40;System.Delegate callback &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;, object args &amp;#61; false, bool isSingleParameter &amp;#61; true&amp;#41; &amp;#43; 0x8a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.TryCatchWhen&amp;#40;object source &amp;#61; &amp;#123;System.Windows.Threading.Dispatcher&amp;#125;, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler &amp;#61; null&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.WrappedInvoke&amp;#40;System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler&amp;#41; &amp;#43; 0x44 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeImpl&amp;#40;&amp;#41; &amp;#43; 0x5d bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext&amp;#40;object state&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;mscorlib.dll&amp;#33;System.Threading.ExecutionContext.runTryCode&amp;#40;object userData&amp;#41; &amp;#43; 0x51 bytes&amp;#9;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And then here is where the background thread is deadlocked waiting for the Main thread&amp;#58;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.Invoke&amp;#40;System.Delegate method, object&amp;#91;&amp;#93; args&amp;#41; &amp;#43; 0x3f bytes&amp;#9;&lt;br /&gt;&lt;br /&gt; &amp;#9;&amp;#91;Lightweight Function&amp;#93;&amp;#9;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.ConvertValue&amp;#40;CompasBiz.Scheduling.User value &amp;#61; &amp;#123;CompasBiz.Scheduling.User&amp;#125;&amp;#41; Line 40 &amp;#43; 0x1a bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformationBase&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,Obtics.Tuple&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,System.Func&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.ConvertEnumerator.MoveNext&amp;#40;&amp;#41; Line 23 &amp;#43; 0x73 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.VersionedEnumerator.EnumeratorWrapper&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.MoveNext&amp;#40;&amp;#41; Line 57 &amp;#43; 0xd bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 73 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.UpdateHaveChangedListeningClients&amp;#40;bool newValue &amp;#61; true, bool oldValue &amp;#61; false&amp;#41; Line 174 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.HaveChangedListeningClients.set&amp;#40;bool value &amp;#61; true&amp;#41; Line 101 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.SubscribeINC&amp;#40;Obtics.IReceiveChangeNotification receiver &amp;#61; Count &amp;#61; Cannot evaluate expression because the current thread is in a sleep, wait, or join&amp;#41; Line 157 &amp;#43; 0x28 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 67 &amp;#43; 0xc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.ResultInformationExposed&amp;#40;&amp;#41; Line 180 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 88 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.System.Collections.Generic.IEnumerable&amp;#60;TOut&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 45 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;System.Core.dll&amp;#33;System.Linq.Enumerable.Count&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; source&amp;#41; &amp;#43; 0xb2 bytes&amp;#9;&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.InitializeDefaults&amp;#40;&amp;#41; Line 480 &amp;#43; 0x1a bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.OnUsersWithSchedulesCollectionChanged&amp;#40;Object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;, System.Collections.Specialized.NotifyCollectionChangedEventArgs e &amp;#61; &amp;#123;Obtics.Collections.OrderedNotifyCollectionChangedEventArgs&amp;#125;&amp;#41; Line 341 &amp;#43; 0xa bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCToNCC.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs changeArgs &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 150 &amp;#43; 0x20 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.OpaqueTransformationBase&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 106 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;object rawMessage &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 187 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Values.Transformations.NPCToNCBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.npc_PropertyChanged&amp;#40;object sender &amp;#61; &amp;#123;Npipm.AsyncValueProvider&amp;#60;Npipm.Compas.ViewModels.MainViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.ComponentModel.PropertyChangedEventArgs e &amp;#61; &amp;#123;System.ComponentModel.PropertyChangedEventArgs&amp;#125;&amp;#41; Line 29 &amp;#43; 0xcc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 26 &amp;#43; 0x3c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ObjectModel.DispatcherNotifiedObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 31 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#40;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41; expression &amp;#61; &amp;#123;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 38 &amp;#43; 0x5c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ValueProviderBaseBase&amp;#40;Of T&amp;#41;.NotifyValueChanged&amp;#40;&amp;#41; Line 27 &amp;#43; 0x1cc bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AttachedValueProviderBase&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 98 &amp;#43; 0x8 bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 66 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.LoadAsyncValue&amp;#40;&amp;#41; Line 84 &amp;#43; 0x68 bytes&amp;#9;Basic&lt;br /&gt;&lt;br /&gt;The only working solution I&amp;#39;ve found so far is to Dispatch the INotifyPropertyChanged event, itself, to the Main thread, so that &amp;#42;all&amp;#42; Obtics code runs on the Main thread instead of the background thread.  But this defeats most of the advantages of having another thread at all, since most of the processing still occurs on the Main thread.&lt;br /&gt;&lt;br /&gt;So to simplify my question&amp;#58; I basically want to know the best way to use Obtics on a non-UI thread that needs to access the UI thread in mid-expression.&lt;br /&gt;</description><author>joshmouch</author><pubDate>Sat, 21 Nov 2009 00:34:33 GMT</pubDate><guid isPermaLink="false">Commented Issue: Multithreading &amp; DependencyObject [5483] 20091121123433A</guid></item><item><title>Commented Issue: Multithreading &amp; DependencyObject [5483]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5483</link><description>I&amp;#39;ve come across an implementation problem with using Obtics on a background thread with a DependencyObject on the UI thread and am wondering if you&amp;#39;ve come across it and how you think it should be handled.&lt;br /&gt;&lt;br /&gt;I have a property that is computed using Obtics on a separate thread.  At some point after a change event occurs on an object used in the Obtics expression, the expression needs to use the UI&amp;#39;s Dispatcher to get to the UI thread &amp;#40;e.g. to get and set a DependencyProperty value&amp;#41;.&lt;br /&gt;The problem I have is that every way I&amp;#39;ve tried to do this &amp;#42;after&amp;#42; the change event occurs, Obtics is stuck on the Main thread in a lock and so the background thread can&amp;#39;t use the main thread to do its thing.  Here is a partial stack trace of the Main thread and the background thread.  On the main thread, Obtics is stuck in a sleep loop waiting for some flag to be set and the background thread is stuck waiting for the Main thread to be free for use&amp;#58;&lt;br /&gt;&amp;#62;&amp;#9;Obtics.dll&amp;#33;Obtics.ObservableObjectBase.Lock&amp;#40;&amp;#41; Line 113 &amp;#43; 0x7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.CollectionChanged.add&amp;#40;System.Collections.Specialized.NotifyCollectionChangedEventHandler value &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;&amp;#41; Line 167 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionView.CollectionView&amp;#40;System.Collections.IEnumerable collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, int moveToFirst &amp;#61; -1&amp;#41; &amp;#43; 0x12b bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.EnumerableCollectionView.EnumerableCollectionView&amp;#40;System.Collections.IEnumerable source &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; &amp;#43; 0x15 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.ViewManager.GetViewRecord&amp;#40;object collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.Windows.Data.CollectionViewSource cvs &amp;#61; &amp;#123;System.Windows.Data.CollectionViewSource&amp;#125;, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x12c bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.GetViewRecord&amp;#40;object collection, System.Windows.Data.CollectionViewSource key, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x1f bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, bool createView&amp;#41; &amp;#43; 0x43 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, System.Windows.DependencyObject d &amp;#61; &amp;#123;System.Windows.Controls.ListBox&amp;#125;&amp;#41; &amp;#43; 0x28 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemCollection.SetItemsSource&amp;#40;System.Collections.IEnumerable value&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemsControl.OnItemsSourceChanged&amp;#40;System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0xad bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.FrameworkElement.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x50 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.NotifyPropertyChange&amp;#40;System.Windows.DependencyPropertyChangedEventArgs args&amp;#41; &amp;#43; 0x2c bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.UpdateEffectiveValue&amp;#40;System.Windows.EntryIndex entryIndex &amp;#61; &amp;#123;System.Windows.EntryIndex&amp;#125;, System.Windows.DependencyProperty dp &amp;#61; &amp;#123;System.Windows.DependencyProperty&amp;#125;, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry &amp;#61; &amp;#123;System.Windows.EffectiveValueEntry&amp;#125;, bool coerceWithDeferredReference, System.Windows.OperationType operationType&amp;#41; &amp;#43; 0x515 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.InvalidateProperty&amp;#40;System.Windows.DependencyProperty dp&amp;#41; &amp;#43; 0xa2 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Invalidate&amp;#40;bool isASubPropertyChange&amp;#41; &amp;#43; 0x60 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.TransferValue&amp;#40;object newValue, bool isASubPropertyChange&amp;#41; &amp;#43; 0x1c4 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Activate&amp;#40;object item&amp;#41; &amp;#43; 0xe7 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.AttachToContext&amp;#40;System.Windows.Data.BindingExpression.AttachAttempt attempt&amp;#41; &amp;#43; 0x1de bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext&amp;#40;bool lastChance&amp;#41; &amp;#43; 0x19 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Task.Run&amp;#40;bool lastChance &amp;#61; false&amp;#41; &amp;#43; 0x31 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Run&amp;#40;object arg&amp;#41; &amp;#43; 0xb7 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.InternalRealCall&amp;#40;System.Delegate callback &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;, object args &amp;#61; false, bool isSingleParameter &amp;#61; true&amp;#41; &amp;#43; 0x8a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.TryCatchWhen&amp;#40;object source &amp;#61; &amp;#123;System.Windows.Threading.Dispatcher&amp;#125;, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler &amp;#61; null&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.WrappedInvoke&amp;#40;System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler&amp;#41; &amp;#43; 0x44 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeImpl&amp;#40;&amp;#41; &amp;#43; 0x5d bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext&amp;#40;object state&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;mscorlib.dll&amp;#33;System.Threading.ExecutionContext.runTryCode&amp;#40;object userData&amp;#41; &amp;#43; 0x51 bytes&amp;#9;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And then here is where the background thread is deadlocked waiting for the Main thread&amp;#58;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.Invoke&amp;#40;System.Delegate method, object&amp;#91;&amp;#93; args&amp;#41; &amp;#43; 0x3f bytes&amp;#9;&lt;br /&gt;&lt;br /&gt; &amp;#9;&amp;#91;Lightweight Function&amp;#93;&amp;#9;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.ConvertValue&amp;#40;CompasBiz.Scheduling.User value &amp;#61; &amp;#123;CompasBiz.Scheduling.User&amp;#125;&amp;#41; Line 40 &amp;#43; 0x1a bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformationBase&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,Obtics.Tuple&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,System.Func&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.ConvertEnumerator.MoveNext&amp;#40;&amp;#41; Line 23 &amp;#43; 0x73 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.VersionedEnumerator.EnumeratorWrapper&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.MoveNext&amp;#40;&amp;#41; Line 57 &amp;#43; 0xd bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 73 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.UpdateHaveChangedListeningClients&amp;#40;bool newValue &amp;#61; true, bool oldValue &amp;#61; false&amp;#41; Line 174 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.HaveChangedListeningClients.set&amp;#40;bool value &amp;#61; true&amp;#41; Line 101 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.SubscribeINC&amp;#40;Obtics.IReceiveChangeNotification receiver &amp;#61; Count &amp;#61; Cannot evaluate expression because the current thread is in a sleep, wait, or join&amp;#41; Line 157 &amp;#43; 0x28 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 67 &amp;#43; 0xc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.ResultInformationExposed&amp;#40;&amp;#41; Line 180 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 88 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.System.Collections.Generic.IEnumerable&amp;#60;TOut&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 45 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;System.Core.dll&amp;#33;System.Linq.Enumerable.Count&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; source&amp;#41; &amp;#43; 0xb2 bytes&amp;#9;&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.InitializeDefaults&amp;#40;&amp;#41; Line 480 &amp;#43; 0x1a bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.OnUsersWithSchedulesCollectionChanged&amp;#40;Object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;, System.Collections.Specialized.NotifyCollectionChangedEventArgs e &amp;#61; &amp;#123;Obtics.Collections.OrderedNotifyCollectionChangedEventArgs&amp;#125;&amp;#41; Line 341 &amp;#43; 0xa bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCToNCC.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs changeArgs &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 150 &amp;#43; 0x20 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.OpaqueTransformationBase&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 106 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;object rawMessage &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 187 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Values.Transformations.NPCToNCBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.npc_PropertyChanged&amp;#40;object sender &amp;#61; &amp;#123;Npipm.AsyncValueProvider&amp;#60;Npipm.Compas.ViewModels.MainViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.ComponentModel.PropertyChangedEventArgs e &amp;#61; &amp;#123;System.ComponentModel.PropertyChangedEventArgs&amp;#125;&amp;#41; Line 29 &amp;#43; 0xcc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 26 &amp;#43; 0x3c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ObjectModel.DispatcherNotifiedObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 31 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#40;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41; expression &amp;#61; &amp;#123;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 38 &amp;#43; 0x5c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ValueProviderBaseBase&amp;#40;Of T&amp;#41;.NotifyValueChanged&amp;#40;&amp;#41; Line 27 &amp;#43; 0x1cc bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AttachedValueProviderBase&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 98 &amp;#43; 0x8 bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 66 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.LoadAsyncValue&amp;#40;&amp;#41; Line 84 &amp;#43; 0x68 bytes&amp;#9;Basic&lt;br /&gt;&lt;br /&gt;The only working solution I&amp;#39;ve found so far is to Dispatch the INotifyPropertyChanged event, itself, to the Main thread, so that &amp;#42;all&amp;#42; Obtics code runs on the Main thread instead of the background thread.  But this defeats most of the advantages of having another thread at all, since most of the processing still occurs on the Main thread.&lt;br /&gt;&lt;br /&gt;So to simplify my question&amp;#58; I basically want to know the best way to use Obtics on a non-UI thread that needs to access the UI thread in mid-expression.&lt;br /&gt;</description><author>joshmouch</author><pubDate>Sat, 21 Nov 2009 00:15:38 GMT</pubDate><guid isPermaLink="false">Commented Issue: Multithreading &amp; DependencyObject [5483] 20091121121538A</guid></item><item><title>Commented Issue: Multithreading &amp; DependencyObject [5483]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5483</link><description>I&amp;#39;ve come across an implementation problem with using Obtics on a background thread with a DependencyObject on the UI thread and am wondering if you&amp;#39;ve come across it and how you think it should be handled.&lt;br /&gt;&lt;br /&gt;I have a property that is computed using Obtics on a separate thread.  At some point after a change event occurs on an object used in the Obtics expression, the expression needs to use the UI&amp;#39;s Dispatcher to get to the UI thread &amp;#40;e.g. to get and set a DependencyProperty value&amp;#41;.&lt;br /&gt;The problem I have is that every way I&amp;#39;ve tried to do this &amp;#42;after&amp;#42; the change event occurs, Obtics is stuck on the Main thread in a lock and so the background thread can&amp;#39;t use the main thread to do its thing.  Here is a partial stack trace of the Main thread and the background thread.  On the main thread, Obtics is stuck in a sleep loop waiting for some flag to be set and the background thread is stuck waiting for the Main thread to be free for use&amp;#58;&lt;br /&gt;&amp;#62;&amp;#9;Obtics.dll&amp;#33;Obtics.ObservableObjectBase.Lock&amp;#40;&amp;#41; Line 113 &amp;#43; 0x7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.CollectionChanged.add&amp;#40;System.Collections.Specialized.NotifyCollectionChangedEventHandler value &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;&amp;#41; Line 167 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionView.CollectionView&amp;#40;System.Collections.IEnumerable collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, int moveToFirst &amp;#61; -1&amp;#41; &amp;#43; 0x12b bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.EnumerableCollectionView.EnumerableCollectionView&amp;#40;System.Collections.IEnumerable source &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; &amp;#43; 0x15 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.ViewManager.GetViewRecord&amp;#40;object collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.Windows.Data.CollectionViewSource cvs &amp;#61; &amp;#123;System.Windows.Data.CollectionViewSource&amp;#125;, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x12c bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.GetViewRecord&amp;#40;object collection, System.Windows.Data.CollectionViewSource key, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x1f bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, bool createView&amp;#41; &amp;#43; 0x43 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, System.Windows.DependencyObject d &amp;#61; &amp;#123;System.Windows.Controls.ListBox&amp;#125;&amp;#41; &amp;#43; 0x28 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemCollection.SetItemsSource&amp;#40;System.Collections.IEnumerable value&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemsControl.OnItemsSourceChanged&amp;#40;System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0xad bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.FrameworkElement.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x50 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.NotifyPropertyChange&amp;#40;System.Windows.DependencyPropertyChangedEventArgs args&amp;#41; &amp;#43; 0x2c bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.UpdateEffectiveValue&amp;#40;System.Windows.EntryIndex entryIndex &amp;#61; &amp;#123;System.Windows.EntryIndex&amp;#125;, System.Windows.DependencyProperty dp &amp;#61; &amp;#123;System.Windows.DependencyProperty&amp;#125;, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry &amp;#61; &amp;#123;System.Windows.EffectiveValueEntry&amp;#125;, bool coerceWithDeferredReference, System.Windows.OperationType operationType&amp;#41; &amp;#43; 0x515 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.InvalidateProperty&amp;#40;System.Windows.DependencyProperty dp&amp;#41; &amp;#43; 0xa2 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Invalidate&amp;#40;bool isASubPropertyChange&amp;#41; &amp;#43; 0x60 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.TransferValue&amp;#40;object newValue, bool isASubPropertyChange&amp;#41; &amp;#43; 0x1c4 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Activate&amp;#40;object item&amp;#41; &amp;#43; 0xe7 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.AttachToContext&amp;#40;System.Windows.Data.BindingExpression.AttachAttempt attempt&amp;#41; &amp;#43; 0x1de bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext&amp;#40;bool lastChance&amp;#41; &amp;#43; 0x19 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Task.Run&amp;#40;bool lastChance &amp;#61; false&amp;#41; &amp;#43; 0x31 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Run&amp;#40;object arg&amp;#41; &amp;#43; 0xb7 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.InternalRealCall&amp;#40;System.Delegate callback &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;, object args &amp;#61; false, bool isSingleParameter &amp;#61; true&amp;#41; &amp;#43; 0x8a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.TryCatchWhen&amp;#40;object source &amp;#61; &amp;#123;System.Windows.Threading.Dispatcher&amp;#125;, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler &amp;#61; null&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.WrappedInvoke&amp;#40;System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler&amp;#41; &amp;#43; 0x44 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeImpl&amp;#40;&amp;#41; &amp;#43; 0x5d bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext&amp;#40;object state&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;mscorlib.dll&amp;#33;System.Threading.ExecutionContext.runTryCode&amp;#40;object userData&amp;#41; &amp;#43; 0x51 bytes&amp;#9;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And then here is where the background thread is deadlocked waiting for the Main thread&amp;#58;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.Invoke&amp;#40;System.Delegate method, object&amp;#91;&amp;#93; args&amp;#41; &amp;#43; 0x3f bytes&amp;#9;&lt;br /&gt;&lt;br /&gt; &amp;#9;&amp;#91;Lightweight Function&amp;#93;&amp;#9;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.ConvertValue&amp;#40;CompasBiz.Scheduling.User value &amp;#61; &amp;#123;CompasBiz.Scheduling.User&amp;#125;&amp;#41; Line 40 &amp;#43; 0x1a bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformationBase&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,Obtics.Tuple&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,System.Func&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.ConvertEnumerator.MoveNext&amp;#40;&amp;#41; Line 23 &amp;#43; 0x73 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.VersionedEnumerator.EnumeratorWrapper&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.MoveNext&amp;#40;&amp;#41; Line 57 &amp;#43; 0xd bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 73 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.UpdateHaveChangedListeningClients&amp;#40;bool newValue &amp;#61; true, bool oldValue &amp;#61; false&amp;#41; Line 174 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.HaveChangedListeningClients.set&amp;#40;bool value &amp;#61; true&amp;#41; Line 101 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.SubscribeINC&amp;#40;Obtics.IReceiveChangeNotification receiver &amp;#61; Count &amp;#61; Cannot evaluate expression because the current thread is in a sleep, wait, or join&amp;#41; Line 157 &amp;#43; 0x28 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 67 &amp;#43; 0xc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.ResultInformationExposed&amp;#40;&amp;#41; Line 180 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 88 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.System.Collections.Generic.IEnumerable&amp;#60;TOut&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 45 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;System.Core.dll&amp;#33;System.Linq.Enumerable.Count&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; source&amp;#41; &amp;#43; 0xb2 bytes&amp;#9;&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.InitializeDefaults&amp;#40;&amp;#41; Line 480 &amp;#43; 0x1a bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.OnUsersWithSchedulesCollectionChanged&amp;#40;Object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;, System.Collections.Specialized.NotifyCollectionChangedEventArgs e &amp;#61; &amp;#123;Obtics.Collections.OrderedNotifyCollectionChangedEventArgs&amp;#125;&amp;#41; Line 341 &amp;#43; 0xa bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCToNCC.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs changeArgs &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 150 &amp;#43; 0x20 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.OpaqueTransformationBase&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 106 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;object rawMessage &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 187 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Values.Transformations.NPCToNCBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.npc_PropertyChanged&amp;#40;object sender &amp;#61; &amp;#123;Npipm.AsyncValueProvider&amp;#60;Npipm.Compas.ViewModels.MainViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.ComponentModel.PropertyChangedEventArgs e &amp;#61; &amp;#123;System.ComponentModel.PropertyChangedEventArgs&amp;#125;&amp;#41; Line 29 &amp;#43; 0xcc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 26 &amp;#43; 0x3c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ObjectModel.DispatcherNotifiedObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 31 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#40;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41; expression &amp;#61; &amp;#123;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 38 &amp;#43; 0x5c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ValueProviderBaseBase&amp;#40;Of T&amp;#41;.NotifyValueChanged&amp;#40;&amp;#41; Line 27 &amp;#43; 0x1cc bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AttachedValueProviderBase&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 98 &amp;#43; 0x8 bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 66 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.LoadAsyncValue&amp;#40;&amp;#41; Line 84 &amp;#43; 0x68 bytes&amp;#9;Basic&lt;br /&gt;&lt;br /&gt;The only working solution I&amp;#39;ve found so far is to Dispatch the INotifyPropertyChanged event, itself, to the Main thread, so that &amp;#42;all&amp;#42; Obtics code runs on the Main thread instead of the background thread.  But this defeats most of the advantages of having another thread at all, since most of the processing still occurs on the Main thread.&lt;br /&gt;&lt;br /&gt;So to simplify my question&amp;#58; I basically want to know the best way to use Obtics on a non-UI thread that needs to access the UI thread in mid-expression.&lt;br /&gt;</description><author>Throb</author><pubDate>Fri, 20 Nov 2009 18:22:38 GMT</pubDate><guid isPermaLink="false">Commented Issue: Multithreading &amp; DependencyObject [5483] 20091120062238P</guid></item><item><title>Created Issue: Multithreading &amp; DependencyObject [5483]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5483</link><description>I&amp;#39;ve come across an implementation problem with using Obtics on a background thread with a DependencyObject on the UI thread and am wondering if you&amp;#39;ve come across it and how you think it should be handled.&lt;br /&gt;&lt;br /&gt;I have a property that is computed using Obtics on a separate thread.  At some point after a change event occurs on an object used in the Obtics expression, the expression needs to use the UI&amp;#39;s Dispatcher to get to the UI thread &amp;#40;e.g. to get and set a DependencyProperty value&amp;#41;.&lt;br /&gt;The problem I have is that every way I&amp;#39;ve tried to do this &amp;#42;after&amp;#42; the change event occurs, Obtics is stuck on the Main thread in a lock and so the background thread can&amp;#39;t use the main thread to do its thing.  Here is a partial stack trace of the Main thread and the background thread.  On the main thread, Obtics is stuck in a sleep loop waiting for some flag to be set and the background thread is stuck waiting for the Main thread to be free for use&amp;#58;&lt;br /&gt;&amp;#62;&amp;#9;Obtics.dll&amp;#33;Obtics.ObservableObjectBase.Lock&amp;#40;&amp;#41; Line 113 &amp;#43; 0x7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.CollectionChanged.add&amp;#40;System.Collections.Specialized.NotifyCollectionChangedEventHandler value &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;&amp;#41; Line 167 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionView.CollectionView&amp;#40;System.Collections.IEnumerable collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, int moveToFirst &amp;#61; -1&amp;#41; &amp;#43; 0x12b bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.EnumerableCollectionView.EnumerableCollectionView&amp;#40;System.Collections.IEnumerable source &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; &amp;#43; 0x15 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.ViewManager.GetViewRecord&amp;#40;object collection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.Windows.Data.CollectionViewSource cvs &amp;#61; &amp;#123;System.Windows.Data.CollectionViewSource&amp;#125;, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x12c bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.GetViewRecord&amp;#40;object collection, System.Windows.Data.CollectionViewSource key, System.Type collectionViewType, bool createView&amp;#41; &amp;#43; 0x1f bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, bool createView&amp;#41; &amp;#43; 0x43 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.CollectionViewSource.GetDefaultCollectionView&amp;#40;object source, System.Windows.DependencyObject d &amp;#61; &amp;#123;System.Windows.Controls.ListBox&amp;#125;&amp;#41; &amp;#43; 0x28 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemCollection.SetItemsSource&amp;#40;System.Collections.IEnumerable value&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Controls.ItemsControl.OnItemsSourceChanged&amp;#40;System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0xad bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.FrameworkElement.OnPropertyChanged&amp;#40;System.Windows.DependencyPropertyChangedEventArgs e&amp;#41; &amp;#43; 0x50 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.NotifyPropertyChange&amp;#40;System.Windows.DependencyPropertyChangedEventArgs args&amp;#41; &amp;#43; 0x2c bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.UpdateEffectiveValue&amp;#40;System.Windows.EntryIndex entryIndex &amp;#61; &amp;#123;System.Windows.EntryIndex&amp;#125;, System.Windows.DependencyProperty dp &amp;#61; &amp;#123;System.Windows.DependencyProperty&amp;#125;, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry &amp;#61; &amp;#123;System.Windows.EffectiveValueEntry&amp;#125;, bool coerceWithDeferredReference, System.Windows.OperationType operationType&amp;#41; &amp;#43; 0x515 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.DependencyObject.InvalidateProperty&amp;#40;System.Windows.DependencyProperty dp&amp;#41; &amp;#43; 0xa2 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Invalidate&amp;#40;bool isASubPropertyChange&amp;#41; &amp;#43; 0x60 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.TransferValue&amp;#40;object newValue, bool isASubPropertyChange&amp;#41; &amp;#43; 0x1c4 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.Activate&amp;#40;object item&amp;#41; &amp;#43; 0xe7 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.AttachToContext&amp;#40;System.Windows.Data.BindingExpression.AttachAttempt attempt&amp;#41; &amp;#43; 0x1de bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext&amp;#40;bool lastChance&amp;#41; &amp;#43; 0x19 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Task.Run&amp;#40;bool lastChance &amp;#61; false&amp;#41; &amp;#43; 0x31 bytes&amp;#9;&lt;br /&gt; &amp;#9;PresentationFramework.dll&amp;#33;MS.Internal.Data.DataBindEngine.Run&amp;#40;object arg&amp;#41; &amp;#43; 0xb7 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.InternalRealCall&amp;#40;System.Delegate callback &amp;#61; &amp;#123;Method &amp;#61; Cannot evaluate expression because the code of the current method is optimized.&amp;#125;, object args &amp;#61; false, bool isSingleParameter &amp;#61; true&amp;#41; &amp;#43; 0x8a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.ExceptionWrapper.TryCatchWhen&amp;#40;object source &amp;#61; &amp;#123;System.Windows.Threading.Dispatcher&amp;#125;, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler &amp;#61; null&amp;#41; &amp;#43; 0x4a bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.WrappedInvoke&amp;#40;System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler&amp;#41; &amp;#43; 0x44 bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeImpl&amp;#40;&amp;#41; &amp;#43; 0x5d bytes&amp;#9;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext&amp;#40;object state&amp;#41; &amp;#43; 0x38 bytes&amp;#9;&lt;br /&gt; &amp;#9;mscorlib.dll&amp;#33;System.Threading.ExecutionContext.runTryCode&amp;#40;object userData&amp;#41; &amp;#43; 0x51 bytes&amp;#9;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And then here is where the background thread is deadlocked waiting for the Main thread&amp;#58;&lt;br /&gt; &amp;#9;WindowsBase.dll&amp;#33;System.Windows.Threading.Dispatcher.Invoke&amp;#40;System.Delegate method, object&amp;#91;&amp;#93; args&amp;#41; &amp;#43; 0x3f bytes&amp;#9;&lt;br /&gt;&lt;br /&gt; &amp;#9;&amp;#91;Lightweight Function&amp;#93;&amp;#9;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.ConvertValue&amp;#40;CompasBiz.Scheduling.User value &amp;#61; &amp;#123;CompasBiz.Scheduling.User&amp;#125;&amp;#41; Line 40 &amp;#43; 0x1a bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.ConvertTransformationBase&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,Obtics.Tuple&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;CompasBiz.Scheduling.User&amp;#62;,System.Func&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.ConvertEnumerator.MoveNext&amp;#40;&amp;#41; Line 23 &amp;#43; 0x73 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.VersionedEnumerator.EnumeratorWrapper&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;.MoveNext&amp;#40;&amp;#41; Line 57 &amp;#43; 0xd bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.ConvertTransformation&amp;#60;CompasBiz.Scheduling.User,Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 73 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.UpdateHaveChangedListeningClients&amp;#40;bool newValue &amp;#61; true, bool oldValue &amp;#61; false&amp;#41; Line 174 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.HaveChangedListeningClients.set&amp;#40;bool value &amp;#61; true&amp;#41; Line 101 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.SubscribeINC&amp;#40;Obtics.IReceiveChangeNotification receiver &amp;#61; Count &amp;#61; Cannot evaluate expression because the current thread is in a sleep, wait, or join&amp;#41; Line 157 &amp;#43; 0x28 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.BufferNodeCC.BufferNodeCC&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; rawCollection &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62; owner &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;&amp;#41; Line 67 &amp;#43; 0xc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.RefreshBuffer&amp;#40;&amp;#41; Line 150 &amp;#43; 0xc7 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;.ResultInformationExposed&amp;#40;&amp;#41; Line 180 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 88 &amp;#43; 0x8 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObjectToVE&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.System.Collections.Generic.IEnumerable&amp;#60;TOut&amp;#62;.GetEnumerator&amp;#40;&amp;#41; Line 45 &amp;#43; 0x9 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;System.Core.dll&amp;#33;System.Linq.Enumerable.Count&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#40;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62; source&amp;#41; &amp;#43; 0xb2 bytes&amp;#9;&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.InitializeDefaults&amp;#40;&amp;#41; Line 480 &amp;#43; 0x1a bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.Compas.Wpf.exe&amp;#33;Npipm.Compas.ViewModels.MainViewModel.OnUsersWithSchedulesCollectionChanged&amp;#40;Object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;, System.Collections.Specialized.NotifyCollectionChangedEventArgs e &amp;#61; &amp;#123;Obtics.Collections.OrderedNotifyCollectionChangedEventArgs&amp;#125;&amp;#41; Line 341 &amp;#43; 0xa bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCToNCC.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs changeArgs &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 150 &amp;#43; 0x20 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Collections.Transformations.OpaqueTransformationBase&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 106 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Collections.IVersionedEnumerable&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.AsCollectionNullableTransformation&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INCollectionResetEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCSourcedObject&amp;#60;Obtics.Tuple&amp;#60;Obtics.Values.IInternalValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;,System.Func&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;,bool&amp;#62;&amp;#62;&amp;#62;.NotifyChanged&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs args &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 144 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NotifyChangedReceiverTable.SendMessage&amp;#40;object sender &amp;#61; &amp;#123;Obtics.Values.Transformations.NPCToNC&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 355 &amp;#43; 0xf bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;Obtics.INCEventArgs message &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 227 &amp;#43; 0x13 bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.NCObservableObjectBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.Release&amp;#40;object rawMessage &amp;#61; &amp;#123;Obtics.INPropertyChangedEventArgs&amp;#125;&amp;#41; Line 187 &amp;#43; 0xb bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Obtics.dll&amp;#33;Obtics.Values.Transformations.NPCToNCBase&amp;#60;Obtics.Values.IValueProvider&amp;#60;System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#62;.npc_PropertyChanged&amp;#40;object sender &amp;#61; &amp;#123;Npipm.AsyncValueProvider&amp;#60;Npipm.Compas.ViewModels.MainViewModel,System.Collections.Generic.IEnumerable&amp;#60;Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#62;&amp;#62;&amp;#125;, System.ComponentModel.PropertyChangedEventArgs e &amp;#61; &amp;#123;System.ComponentModel.PropertyChangedEventArgs&amp;#125;&amp;#41; Line 29 &amp;#43; 0xcc bytes&amp;#9;C&amp;#35;&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 26 &amp;#43; 0x3c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ObjectModel.DispatcherNotifiedObservableObject.NotifyPropertyChanged&amp;#40;String propertyName &amp;#61; &amp;#34;Value&amp;#34;&amp;#41; Line 31 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.dll&amp;#33;Npipm.ObjectModel.ObservableObject.NotifyPropertyChanged&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#40;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41; expression &amp;#61; &amp;#123;System.Linq.Expressions.Expression&amp;#40;Of System.Func&amp;#40;Of System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 38 &amp;#43; 0x5c bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.ValueProviderBaseBase&amp;#40;Of T&amp;#41;.NotifyValueChanged&amp;#40;&amp;#41; Line 27 &amp;#43; 0x1cc bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AttachedValueProviderBase&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 98 &amp;#43; 0x8 bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.set_Value&amp;#40;System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41; value &amp;#61; &amp;#123;Obtics.Collections.Transformations.CascadeTransformation&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel, System.Collections.Generic.IEnumerable&amp;#40;Of Npipm.Compas.ViewModels.UserScheduleViewModel&amp;#41;&amp;#41;&amp;#125;&amp;#41; Line 66 &amp;#43; 0xb bytes&amp;#9;Basic&lt;br /&gt; &amp;#9;Npipm.WinFx.dll&amp;#33;Npipm.AsyncValueProvider&amp;#40;Of TOwner, T&amp;#41;.LoadAsyncValue&amp;#40;&amp;#41; Line 84 &amp;#43; 0x68 bytes&amp;#9;Basic&lt;br /&gt;&lt;br /&gt;The only working solution I&amp;#39;ve found so far is to Dispatch the INotifyPropertyChanged event, itself, to the Main thread, so that &amp;#42;all&amp;#42; Obtics code runs on the Main thread instead of the background thread.  But this defeats most of the advantages of having another thread at all, since most of the processing still occurs on the Main thread.&lt;br /&gt;&lt;br /&gt;So to simplify my question&amp;#58; I basically want to know the best way to use Obtics on a non-UI thread that needs to access the UI thread in mid-expression.&lt;br /&gt;</description><author>joshmouch</author><pubDate>Fri, 20 Nov 2009 13:39:41 GMT</pubDate><guid isPermaLink="false">Created Issue: Multithreading &amp; DependencyObject [5483] 20091120013941P</guid></item><item><title>Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5208</link><description>Here is a unit test for a bug I found.  The test called &amp;#34;Test_Control&amp;#34; works as expected.  However, the &amp;#34;Test_Broken&amp;#34; uses an object that has an overridden GetHashCode method, which causes the observed expression to break.&lt;br /&gt;&lt;br /&gt;While this example uses the &amp;#34;Custom GetHashCode&amp;#34; object as a parameter to Enumerable.Range, I have a feeling that this is also the same bug that exists in several other places throughout my application that use a &amp;#34;Custom GetHashCode&amp;#34; object in other ways.&lt;br /&gt;&lt;br /&gt;&amp;#60;code&amp;#62;&lt;br /&gt;Imports System.Collections.Generic&lt;br /&gt;Imports System.ComponentModel&lt;br /&gt;Imports System.Diagnostics&lt;br /&gt;Imports Microsoft.VisualStudio.TestTools.UnitTesting&lt;br /&gt;Imports Obtics.Values&lt;br /&gt;Imports System.Collections.Specialized&lt;br /&gt;&lt;br /&gt;&amp;#60;TestClass&amp;#40;&amp;#41;&amp;#62; Public Class ObticsBug_OverridingGetHashCodeBreaksEnumerable&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Control&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New WorkingRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New WorkingRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of WorkingRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Broken&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New BrokenRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New BrokenRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of BrokenRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Protected Overridable Sub OnResultCollectionChanged&amp;#40;ByVal sender As Object, ByVal e As System.Collections.Specialized.NotifyCollectionChangedEventArgs&amp;#41;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class WorkingRange&lt;br /&gt;&amp;#9;&amp;#9;Implements INotifyPropertyChanged&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; &amp;#91;end&amp;#93;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; start&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _End As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property &amp;#91;End&amp;#93;&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _End&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;End&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _Start As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property Start&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Start&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;Start&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Event PropertyChanged&amp;#40;ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs&amp;#41; Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class BrokenRange&lt;br /&gt;&amp;#9;&amp;#9;Inherits WorkingRange&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;MyBase.New&amp;#40;start, &amp;#91;end&amp;#93;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Overrides Function GetHashCode&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim code As String &amp;#61; &amp;#34;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.Start.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; &amp;#34;&amp;#36;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.End.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim hashCode &amp;#61; code.GetHashCode&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Return hashCode&lt;br /&gt;&amp;#9;&amp;#9;End Function&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;End Class&lt;br /&gt;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;</description><author>Throb</author><pubDate>Thu, 19 Nov 2009 15:56:09 GMT</pubDate><guid isPermaLink="false">Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208] 20091119035609P</guid></item><item><title>Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5208</link><description>Here is a unit test for a bug I found.  The test called &amp;#34;Test_Control&amp;#34; works as expected.  However, the &amp;#34;Test_Broken&amp;#34; uses an object that has an overridden GetHashCode method, which causes the observed expression to break.&lt;br /&gt;&lt;br /&gt;While this example uses the &amp;#34;Custom GetHashCode&amp;#34; object as a parameter to Enumerable.Range, I have a feeling that this is also the same bug that exists in several other places throughout my application that use a &amp;#34;Custom GetHashCode&amp;#34; object in other ways.&lt;br /&gt;&lt;br /&gt;&amp;#60;code&amp;#62;&lt;br /&gt;Imports System.Collections.Generic&lt;br /&gt;Imports System.ComponentModel&lt;br /&gt;Imports System.Diagnostics&lt;br /&gt;Imports Microsoft.VisualStudio.TestTools.UnitTesting&lt;br /&gt;Imports Obtics.Values&lt;br /&gt;Imports System.Collections.Specialized&lt;br /&gt;&lt;br /&gt;&amp;#60;TestClass&amp;#40;&amp;#41;&amp;#62; Public Class ObticsBug_OverridingGetHashCodeBreaksEnumerable&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Control&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New WorkingRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New WorkingRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of WorkingRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Broken&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New BrokenRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New BrokenRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of BrokenRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Protected Overridable Sub OnResultCollectionChanged&amp;#40;ByVal sender As Object, ByVal e As System.Collections.Specialized.NotifyCollectionChangedEventArgs&amp;#41;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class WorkingRange&lt;br /&gt;&amp;#9;&amp;#9;Implements INotifyPropertyChanged&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; &amp;#91;end&amp;#93;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; start&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _End As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property &amp;#91;End&amp;#93;&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _End&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;End&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _Start As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property Start&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Start&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;Start&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Event PropertyChanged&amp;#40;ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs&amp;#41; Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class BrokenRange&lt;br /&gt;&amp;#9;&amp;#9;Inherits WorkingRange&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;MyBase.New&amp;#40;start, &amp;#91;end&amp;#93;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Overrides Function GetHashCode&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim code As String &amp;#61; &amp;#34;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.Start.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; &amp;#34;&amp;#36;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.End.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim hashCode &amp;#61; code.GetHashCode&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Return hashCode&lt;br /&gt;&amp;#9;&amp;#9;End Function&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;End Class&lt;br /&gt;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;</description><author>joshmouch</author><pubDate>Wed, 18 Nov 2009 13:09:15 GMT</pubDate><guid isPermaLink="false">Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208] 20091118010915P</guid></item><item><title>Commented Issue: No exception thrown when observed expression is passed argument with invalid type [5203]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5203</link><description>If an observed expression is passed a parameter that cannot be converted to the type the expression is expecting, no exception is thrown.  I would expect an InvalidTypeCastException to be thrown&amp;#59; otherwise, the bug is near impossible to track down.&lt;br /&gt;&lt;br /&gt;Here is an MS unit test to demonstrate the bug&amp;#58;&lt;br /&gt;&amp;#60;code&amp;#62;&lt;br /&gt;Imports System.Collections.Generic&lt;br /&gt;Imports Microsoft.VisualStudio.TestTools.UnitTesting&lt;br /&gt;Imports Obtics.Values&lt;br /&gt;&lt;br /&gt;&amp;#60;TestClass&amp;#40;&amp;#41;&amp;#62; Public Class ObticsBugTest&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub InvalidCastExceptionNotThrownForExpressionArgument&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim value &amp;#61; New Object&amp;#40;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim workingExpression &amp;#61; New TestExpressionTargetWithCorrectType&amp;#40;New Object&amp;#40;&amp;#41; &amp;#123;value&amp;#125;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim workingObservedCollection &amp;#61; ExpressionObserver.Execute&amp;#40;CType&amp;#40;workingExpression, Object&amp;#41;, _&lt;br /&gt;&amp;#9;&amp;#9; Function&amp;#40;source As IWorking&amp;#41; source.Values&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;1, workingObservedCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenExpression &amp;#61; New TestExpressionTargetWithoutCorrectType&amp;#40;New Object&amp;#40;&amp;#41; &amp;#123;value&amp;#125;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenObservedCollection &amp;#61; ExpressionObserver.Execute&amp;#40;CType&amp;#40;brokenExpression, IBase&amp;#41;, _&lt;br /&gt;&amp;#9;&amp;#9; Function&amp;#40;source As IWorking&amp;#41; source.Values&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;1, brokenObservedCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenExpression2 &amp;#61; New TestExpressionTargetWithoutCorrectType&amp;#40;New Object&amp;#40;&amp;#41; &amp;#123;value&amp;#125;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenObservedCollection2 &amp;#61; ExpressionObserver.Execute&amp;#40;CType&amp;#40;brokenExpression2, Object&amp;#41;, _&lt;br /&gt;&amp;#9;&amp;#9; Function&amp;#40;source As IWorking&amp;#41; source.Values&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;1, brokenObservedCollection2.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class TestExpressionTargetWithCorrectType&lt;br /&gt;&amp;#9;&amp;#9;Implements IWorking&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal values As IEnumerable&amp;#40;Of Object&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Values &amp;#61; values&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public ReadOnly Property Values&amp;#40;&amp;#41; As IEnumerable&amp;#40;Of Object&amp;#41; Implements IWorking.Values&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Values&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&amp;#9;&amp;#9;Private _Values As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class TestExpressionTargetWithoutCorrectType&lt;br /&gt;&amp;#9;&amp;#9;Implements IBase&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal values As IEnumerable&amp;#40;Of Object&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Values &amp;#61; values&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public ReadOnly Property Values&amp;#40;&amp;#41; As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Values&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&amp;#9;&amp;#9;Private _Values As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Interface IWorking&lt;br /&gt;&amp;#9;&amp;#9;Inherits IBase&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;ReadOnly Property Values&amp;#40;&amp;#41; As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&amp;#9;End Interface&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Interface IBase&lt;br /&gt;&lt;br /&gt;&amp;#9;End Interface&lt;br /&gt;End Class&lt;br /&gt;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;</description><author>Throb</author><pubDate>Sun, 15 Nov 2009 17:38:31 GMT</pubDate><guid isPermaLink="false">Commented Issue: No exception thrown when observed expression is passed argument with invalid type [5203] 20091115053831P</guid></item><item><title>Commented Issue: Decimal madness (incorrect calculation values using ExpressionObserver, no decimal places??) [5379]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5379</link><description>What is wrong with this test&amp;#63;&lt;br /&gt;&lt;br /&gt;        &amp;#91;TestMethod&amp;#40;&amp;#41;&amp;#93;&lt;br /&gt;        public void TestCalcSimple&amp;#40;&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;           IList&amp;#60;double&amp;#62; doubleValues &amp;#61; new double&amp;#91;&amp;#93; &amp;#123; 0.05d, 1d &amp;#125;&amp;#59;&lt;br /&gt;           double doubleResult &amp;#61; Obtics.Values.ExpressionObserver.Execute&amp;#40;&amp;#40;&amp;#41; &amp;#61;&amp;#62; doubleValues.Sum&amp;#40;&amp;#41;&amp;#41;.Value&amp;#59;&lt;br /&gt;           &amp;#47;&amp;#47; will be 1.05&lt;br /&gt;           &lt;br /&gt;           IList&amp;#60;decimal&amp;#62; decimalValues &amp;#61; new decimal&amp;#91;&amp;#93; &amp;#123; 0.05M, 1M &amp;#125;&amp;#59;&lt;br /&gt;           decimal obticsDecimalResult &amp;#61; Obtics.Values.ExpressionObserver.Execute&amp;#40;&amp;#40;&amp;#41; &amp;#61;&amp;#62; decimalValues.Sum&amp;#40;&amp;#41;&amp;#41;.Value&amp;#59;&lt;br /&gt;            &amp;#47;&amp;#47; will be 1&lt;br /&gt;&lt;br /&gt;           decimal linqDecimalResult &amp;#61; decimalValues.Sum&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#47;&amp;#47; will be 1.05&lt;br /&gt;            Assert.AreEqual&amp;#40;doubleResult, obticsDecimalResult&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Why can&amp;#39;t obtics calculate a decimal sum, but linq can&amp;#63;&lt;br /&gt;Why can obtics properly evaluate a sum for a double array, but not a decimal array&amp;#63;&lt;br /&gt;Comments: ** Comment from web user: Throb ** &lt;p&gt;False implementation of Decimal Sum and Average. Fixed.&lt;/p&gt;</description><author>Throb</author><pubDate>Mon, 02 Nov 2009 00:15:27 GMT</pubDate><guid isPermaLink="false">Commented Issue: Decimal madness (incorrect calculation values using ExpressionObserver, no decimal places??) [5379] 20091102121527A</guid></item><item><title>Commented Issue: Decimal madness (incorrect calculation values using ExpressionObserver, no decimal places??) [5379]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5379</link><description>What is wrong with this test&amp;#63;&lt;br /&gt;&lt;br /&gt;        &amp;#91;TestMethod&amp;#40;&amp;#41;&amp;#93;&lt;br /&gt;        public void TestCalcSimple&amp;#40;&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;           IList&amp;#60;double&amp;#62; doubleValues &amp;#61; new double&amp;#91;&amp;#93; &amp;#123; 0.05d, 1d &amp;#125;&amp;#59;&lt;br /&gt;           double doubleResult &amp;#61; Obtics.Values.ExpressionObserver.Execute&amp;#40;&amp;#40;&amp;#41; &amp;#61;&amp;#62; doubleValues.Sum&amp;#40;&amp;#41;&amp;#41;.Value&amp;#59;&lt;br /&gt;           &amp;#47;&amp;#47; will be 1.05&lt;br /&gt;           &lt;br /&gt;           IList&amp;#60;decimal&amp;#62; decimalValues &amp;#61; new decimal&amp;#91;&amp;#93; &amp;#123; 0.05M, 1M &amp;#125;&amp;#59;&lt;br /&gt;           decimal obticsDecimalResult &amp;#61; Obtics.Values.ExpressionObserver.Execute&amp;#40;&amp;#40;&amp;#41; &amp;#61;&amp;#62; decimalValues.Sum&amp;#40;&amp;#41;&amp;#41;.Value&amp;#59;&lt;br /&gt;            &amp;#47;&amp;#47; will be 1&lt;br /&gt;&lt;br /&gt;           decimal linqDecimalResult &amp;#61; decimalValues.Sum&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#47;&amp;#47; will be 1.05&lt;br /&gt;            Assert.AreEqual&amp;#40;doubleResult, obticsDecimalResult&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Why can&amp;#39;t obtics calculate a decimal sum, but linq can&amp;#63;&lt;br /&gt;Why can obtics properly evaluate a sum for a double array, but not a decimal array&amp;#63;&lt;br /&gt;Comments: Associated with changeset 30432.</description><author>Throb</author><pubDate>Sun, 01 Nov 2009 23:52:24 GMT</pubDate><guid isPermaLink="false">Commented Issue: Decimal madness (incorrect calculation values using ExpressionObserver, no decimal places??) [5379] 20091101115224P</guid></item><item><title>Commented Issue: Decimal madness (incorrect calculation values using ExpressionObserver, no decimal places??) [5379]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5379</link><description>What is wrong with this test&amp;#63;&lt;br /&gt;&lt;br /&gt;        &amp;#91;TestMethod&amp;#40;&amp;#41;&amp;#93;&lt;br /&gt;        public void TestCalcSimple&amp;#40;&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;           IList&amp;#60;double&amp;#62; doubleValues &amp;#61; new double&amp;#91;&amp;#93; &amp;#123; 0.05d, 1d &amp;#125;&amp;#59;&lt;br /&gt;           double doubleResult &amp;#61; Obtics.Values.ExpressionObserver.Execute&amp;#40;&amp;#40;&amp;#41; &amp;#61;&amp;#62; doubleValues.Sum&amp;#40;&amp;#41;&amp;#41;.Value&amp;#59;&lt;br /&gt;           &amp;#47;&amp;#47; will be 1.05&lt;br /&gt;           &lt;br /&gt;           IList&amp;#60;decimal&amp;#62; decimalValues &amp;#61; new decimal&amp;#91;&amp;#93; &amp;#123; 0.05M, 1M &amp;#125;&amp;#59;&lt;br /&gt;           decimal obticsDecimalResult &amp;#61; Obtics.Values.ExpressionObserver.Execute&amp;#40;&amp;#40;&amp;#41; &amp;#61;&amp;#62; decimalValues.Sum&amp;#40;&amp;#41;&amp;#41;.Value&amp;#59;&lt;br /&gt;            &amp;#47;&amp;#47; will be 1&lt;br /&gt;&lt;br /&gt;           decimal linqDecimalResult &amp;#61; decimalValues.Sum&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#47;&amp;#47; will be 1.05&lt;br /&gt;            Assert.AreEqual&amp;#40;doubleResult, obticsDecimalResult&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Why can&amp;#39;t obtics calculate a decimal sum, but linq can&amp;#63;&lt;br /&gt;Why can obtics properly evaluate a sum for a double array, but not a decimal array&amp;#63;&lt;br /&gt;Comments: ** Comment from web user: rdhatch ** &lt;p&gt;I have the exact same problem - This is a huge issue... I am dead in the water right now.&lt;/p&gt;&lt;p&gt;Obtics - When can this issue be fixed&amp;#63;&lt;/p&gt;&lt;p&gt;Thank you very much -&lt;/p&gt;&lt;p&gt;Ryan D. Hatch&lt;/p&gt;</description><author>rdhatch</author><pubDate>Sat, 31 Oct 2009 17:32:18 GMT</pubDate><guid isPermaLink="false">Commented Issue: Decimal madness (incorrect calculation values using ExpressionObserver, no decimal places??) [5379] 20091031053218P</guid></item><item><title>Created Issue: Decimal madness [5379]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5379</link><description>What is wrong with this test&amp;#63;&lt;br /&gt;&lt;br /&gt;        &amp;#91;TestMethod&amp;#40;&amp;#41;&amp;#93;&lt;br /&gt;        public void TestCalcSimple&amp;#40;&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;           IList&amp;#60;double&amp;#62; doubleValues &amp;#61; new double&amp;#91;&amp;#93; &amp;#123; 0.05d, 1d &amp;#125;&amp;#59;&lt;br /&gt;           double doubleResult &amp;#61; Obtics.Values.ExpressionObserver.Execute&amp;#40;&amp;#40;&amp;#41; &amp;#61;&amp;#62; doubleValues.Sum&amp;#40;&amp;#41;&amp;#41;.Value&amp;#59;&lt;br /&gt;           &amp;#47;&amp;#47; will be 1.05&lt;br /&gt;           &lt;br /&gt;           IList&amp;#60;decimal&amp;#62; decimalValues &amp;#61; new decimal&amp;#91;&amp;#93; &amp;#123; 0.05M, 1M &amp;#125;&amp;#59;&lt;br /&gt;           decimal obticsDecimalResult &amp;#61; Obtics.Values.ExpressionObserver.Execute&amp;#40;&amp;#40;&amp;#41; &amp;#61;&amp;#62; decimalValues.Sum&amp;#40;&amp;#41;&amp;#41;.Value&amp;#59;&lt;br /&gt;            &amp;#47;&amp;#47; will be 1&lt;br /&gt;&lt;br /&gt;           decimal linqDecimalResult &amp;#61; decimalValues.Sum&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#47;&amp;#47; will be 1.05&lt;br /&gt;            Assert.AreEqual&amp;#40;doubleResult, obticsDecimalResult&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Why can&amp;#39;t obtics calculate a decimal sum, but linq can&amp;#63;&lt;br /&gt;Why can obtics properly evaluate a sum for a double array, but not a decimal array&amp;#63;&lt;br /&gt;</description><author>jredekop</author><pubDate>Fri, 30 Oct 2009 15:58:23 GMT</pubDate><guid isPermaLink="false">Created Issue: Decimal madness [5379] 20091030035823P</guid></item><item><title>Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5208</link><description>Here is a unit test for a bug I found.  The test called &amp;#34;Test_Control&amp;#34; works as expected.  However, the &amp;#34;Test_Broken&amp;#34; uses an object that has an overridden GetHashCode method, which causes the observed expression to break.&lt;br /&gt;&lt;br /&gt;While this example uses the &amp;#34;Custom GetHashCode&amp;#34; object as a parameter to Enumerable.Range, I have a feeling that this is also the same bug that exists in several other places throughout my application that use a &amp;#34;Custom GetHashCode&amp;#34; object in other ways.&lt;br /&gt;&lt;br /&gt;&amp;#60;code&amp;#62;&lt;br /&gt;Imports System.Collections.Generic&lt;br /&gt;Imports System.ComponentModel&lt;br /&gt;Imports System.Diagnostics&lt;br /&gt;Imports Microsoft.VisualStudio.TestTools.UnitTesting&lt;br /&gt;Imports Obtics.Values&lt;br /&gt;Imports System.Collections.Specialized&lt;br /&gt;&lt;br /&gt;&amp;#60;TestClass&amp;#40;&amp;#41;&amp;#62; Public Class ObticsBug_OverridingGetHashCodeBreaksEnumerable&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Control&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New WorkingRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New WorkingRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of WorkingRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Broken&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New BrokenRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New BrokenRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of BrokenRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Protected Overridable Sub OnResultCollectionChanged&amp;#40;ByVal sender As Object, ByVal e As System.Collections.Specialized.NotifyCollectionChangedEventArgs&amp;#41;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class WorkingRange&lt;br /&gt;&amp;#9;&amp;#9;Implements INotifyPropertyChanged&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; &amp;#91;end&amp;#93;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; start&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _End As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property &amp;#91;End&amp;#93;&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _End&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;End&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _Start As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property Start&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Start&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;Start&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Event PropertyChanged&amp;#40;ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs&amp;#41; Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class BrokenRange&lt;br /&gt;&amp;#9;&amp;#9;Inherits WorkingRange&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;MyBase.New&amp;#40;start, &amp;#91;end&amp;#93;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Overrides Function GetHashCode&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim code As String &amp;#61; &amp;#34;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.Start.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; &amp;#34;&amp;#36;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.End.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim hashCode &amp;#61; code.GetHashCode&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Return hashCode&lt;br /&gt;&amp;#9;&amp;#9;End Function&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;End Class&lt;br /&gt;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;Comments: Associated with changeset 29452.</description><author>Throb</author><pubDate>Sun, 18 Oct 2009 00:32:51 GMT</pubDate><guid isPermaLink="false">Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208] 20091018123251A</guid></item><item><title>Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5208</link><description>Here is a unit test for a bug I found.  The test called &amp;#34;Test_Control&amp;#34; works as expected.  However, the &amp;#34;Test_Broken&amp;#34; uses an object that has an overridden GetHashCode method, which causes the observed expression to break.&lt;br /&gt;&lt;br /&gt;While this example uses the &amp;#34;Custom GetHashCode&amp;#34; object as a parameter to Enumerable.Range, I have a feeling that this is also the same bug that exists in several other places throughout my application that use a &amp;#34;Custom GetHashCode&amp;#34; object in other ways.&lt;br /&gt;&lt;br /&gt;&amp;#60;code&amp;#62;&lt;br /&gt;Imports System.Collections.Generic&lt;br /&gt;Imports System.ComponentModel&lt;br /&gt;Imports System.Diagnostics&lt;br /&gt;Imports Microsoft.VisualStudio.TestTools.UnitTesting&lt;br /&gt;Imports Obtics.Values&lt;br /&gt;Imports System.Collections.Specialized&lt;br /&gt;&lt;br /&gt;&amp;#60;TestClass&amp;#40;&amp;#41;&amp;#62; Public Class ObticsBug_OverridingGetHashCodeBreaksEnumerable&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Control&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New WorkingRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New WorkingRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of WorkingRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Broken&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New BrokenRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New BrokenRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of BrokenRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Protected Overridable Sub OnResultCollectionChanged&amp;#40;ByVal sender As Object, ByVal e As System.Collections.Specialized.NotifyCollectionChangedEventArgs&amp;#41;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class WorkingRange&lt;br /&gt;&amp;#9;&amp;#9;Implements INotifyPropertyChanged&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; &amp;#91;end&amp;#93;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; start&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _End As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property &amp;#91;End&amp;#93;&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _End&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;End&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _Start As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property Start&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Start&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;Start&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Event PropertyChanged&amp;#40;ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs&amp;#41; Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class BrokenRange&lt;br /&gt;&amp;#9;&amp;#9;Inherits WorkingRange&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;MyBase.New&amp;#40;start, &amp;#91;end&amp;#93;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Overrides Function GetHashCode&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim code As String &amp;#61; &amp;#34;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.Start.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; &amp;#34;&amp;#36;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.End.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim hashCode &amp;#61; code.GetHashCode&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Return hashCode&lt;br /&gt;&amp;#9;&amp;#9;End Function&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;End Class&lt;br /&gt;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: Throb ** &lt;p&gt;You can still use your Range class to prevent Resets without overriding GetHashCode and Equals. But I guess you need those for other purposes.&lt;/p&gt;&lt;p&gt;Unless VB works differently than C&amp;#35; in this resect&amp;#58; _HashCodeMap.TryGetValue&amp;#40;hashCode, hashCode&amp;#41; will set a value in hashCode regardles if it can find one or not. If it can not find an entry it will set a default value in hashCode &amp;#40;because it is an out parameter&amp;#41;.&lt;/p&gt;&lt;p&gt;Busy with a mechanism to override the default equality compare functionality in Obtics. Will probably be finished after the weekend.&lt;/p&gt;</description><author>Throb</author><pubDate>Fri, 16 Oct 2009 07:53:32 GMT</pubDate><guid isPermaLink="false">Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208] 20091016075332A</guid></item><item><title>Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5208</link><description>Here is a unit test for a bug I found.  The test called &amp;#34;Test_Control&amp;#34; works as expected.  However, the &amp;#34;Test_Broken&amp;#34; uses an object that has an overridden GetHashCode method, which causes the observed expression to break.&lt;br /&gt;&lt;br /&gt;While this example uses the &amp;#34;Custom GetHashCode&amp;#34; object as a parameter to Enumerable.Range, I have a feeling that this is also the same bug that exists in several other places throughout my application that use a &amp;#34;Custom GetHashCode&amp;#34; object in other ways.&lt;br /&gt;&lt;br /&gt;&amp;#60;code&amp;#62;&lt;br /&gt;Imports System.Collections.Generic&lt;br /&gt;Imports System.ComponentModel&lt;br /&gt;Imports System.Diagnostics&lt;br /&gt;Imports Microsoft.VisualStudio.TestTools.UnitTesting&lt;br /&gt;Imports Obtics.Values&lt;br /&gt;Imports System.Collections.Specialized&lt;br /&gt;&lt;br /&gt;&amp;#60;TestClass&amp;#40;&amp;#41;&amp;#62; Public Class ObticsBug_OverridingGetHashCodeBreaksEnumerable&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Control&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New WorkingRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New WorkingRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of WorkingRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Broken&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New BrokenRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New BrokenRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of BrokenRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Protected Overridable Sub OnResultCollectionChanged&amp;#40;ByVal sender As Object, ByVal e As System.Collections.Specialized.NotifyCollectionChangedEventArgs&amp;#41;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class WorkingRange&lt;br /&gt;&amp;#9;&amp;#9;Implements INotifyPropertyChanged&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; &amp;#91;end&amp;#93;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; start&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _End As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property &amp;#91;End&amp;#93;&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _End&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;End&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _Start As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property Start&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Start&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;Start&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Event PropertyChanged&amp;#40;ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs&amp;#41; Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class BrokenRange&lt;br /&gt;&amp;#9;&amp;#9;Inherits WorkingRange&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;MyBase.New&amp;#40;start, &amp;#91;end&amp;#93;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Overrides Function GetHashCode&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim code As String &amp;#61; &amp;#34;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.Start.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; &amp;#34;&amp;#36;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.End.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim hashCode &amp;#61; code.GetHashCode&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Return hashCode&lt;br /&gt;&amp;#9;&amp;#9;End Function&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;End Class&lt;br /&gt;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: joshmouch ** &lt;p&gt;I agree that it&amp;#39;s not ideal, but in my case, I think it&amp;#39;s still faster than the alternative.  I have a lot of &amp;#34;nested&amp;#34; enumerations &amp;#40;i.e. enumeration that uses enumeration that uses enumeration&amp;#41;, and anytime an enumeration deep into the tree needs to be re-evaluated, that need for re-evaluation propagates up the tree.  Therefore, anything I can do to prevent a collection reset saves a lot of processing.&lt;/p&gt;&lt;p&gt;&amp;#62; &amp;#34;because you are always returning the same hashcode for all objects&amp;#34;&lt;br /&gt;Not entirely true.  The hashcodes are only shared if an object&amp;#39;s properties change.  So if you have 2 object states &amp;#40;s1, s2&amp;#41; and then change s1&amp;#39;s properties to create a third state, s3, then s1 &amp;#38; s3 will share a hashcode, but s2 will be a different hashcode.&lt;/p&gt;</description><author>joshmouch</author><pubDate>Thu, 15 Oct 2009 15:33:32 GMT</pubDate><guid isPermaLink="false">Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208] 20091015033332P</guid></item><item><title>Commented Issue: No exception thrown when observed expression is passed argument with invalid type [5203]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5203</link><description>If an observed expression is passed a parameter that cannot be converted to the type the expression is expecting, no exception is thrown.  I would expect an InvalidTypeCastException to be thrown&amp;#59; otherwise, the bug is near impossible to track down.&lt;br /&gt;&lt;br /&gt;Here is an MS unit test to demonstrate the bug&amp;#58;&lt;br /&gt;&amp;#60;code&amp;#62;&lt;br /&gt;Imports System.Collections.Generic&lt;br /&gt;Imports Microsoft.VisualStudio.TestTools.UnitTesting&lt;br /&gt;Imports Obtics.Values&lt;br /&gt;&lt;br /&gt;&amp;#60;TestClass&amp;#40;&amp;#41;&amp;#62; Public Class ObticsBugTest&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub InvalidCastExceptionNotThrownForExpressionArgument&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim value &amp;#61; New Object&amp;#40;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim workingExpression &amp;#61; New TestExpressionTargetWithCorrectType&amp;#40;New Object&amp;#40;&amp;#41; &amp;#123;value&amp;#125;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim workingObservedCollection &amp;#61; ExpressionObserver.Execute&amp;#40;CType&amp;#40;workingExpression, Object&amp;#41;, _&lt;br /&gt;&amp;#9;&amp;#9; Function&amp;#40;source As IWorking&amp;#41; source.Values&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;1, workingObservedCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenExpression &amp;#61; New TestExpressionTargetWithoutCorrectType&amp;#40;New Object&amp;#40;&amp;#41; &amp;#123;value&amp;#125;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenObservedCollection &amp;#61; ExpressionObserver.Execute&amp;#40;CType&amp;#40;brokenExpression, IBase&amp;#41;, _&lt;br /&gt;&amp;#9;&amp;#9; Function&amp;#40;source As IWorking&amp;#41; source.Values&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;1, brokenObservedCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenExpression2 &amp;#61; New TestExpressionTargetWithoutCorrectType&amp;#40;New Object&amp;#40;&amp;#41; &amp;#123;value&amp;#125;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenObservedCollection2 &amp;#61; ExpressionObserver.Execute&amp;#40;CType&amp;#40;brokenExpression2, Object&amp;#41;, _&lt;br /&gt;&amp;#9;&amp;#9; Function&amp;#40;source As IWorking&amp;#41; source.Values&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;1, brokenObservedCollection2.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class TestExpressionTargetWithCorrectType&lt;br /&gt;&amp;#9;&amp;#9;Implements IWorking&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal values As IEnumerable&amp;#40;Of Object&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Values &amp;#61; values&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public ReadOnly Property Values&amp;#40;&amp;#41; As IEnumerable&amp;#40;Of Object&amp;#41; Implements IWorking.Values&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Values&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&amp;#9;&amp;#9;Private _Values As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class TestExpressionTargetWithoutCorrectType&lt;br /&gt;&amp;#9;&amp;#9;Implements IBase&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal values As IEnumerable&amp;#40;Of Object&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Values &amp;#61; values&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public ReadOnly Property Values&amp;#40;&amp;#41; As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Values&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&amp;#9;&amp;#9;Private _Values As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Interface IWorking&lt;br /&gt;&amp;#9;&amp;#9;Inherits IBase&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;ReadOnly Property Values&amp;#40;&amp;#41; As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&amp;#9;End Interface&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Interface IBase&lt;br /&gt;&lt;br /&gt;&amp;#9;End Interface&lt;br /&gt;End Class&lt;br /&gt;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: joshmouch ** &lt;p&gt;I might take you up on that.  I&amp;#39;m busy this weekend, but perhaps next, I can put some time aside to work on this.  The big time-consumer will be learning how the internals work so I could create an intelligent solution.  Do you have any design docs you could share&amp;#63;&lt;/p&gt;&lt;p&gt;My preference would still be to throw an exception, as any properties could go unchecked by the developer and would be a hard-to-detect bug.  However, if the exception was thrown when the Checked&amp;#60;T&amp;#62; structure&amp;#39;s value was accessed &amp;#40;like how Nullable&amp;#60;T&amp;#62; does it&amp;#41; then that would be fine.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><author>joshmouch</author><pubDate>Thu, 15 Oct 2009 15:25:22 GMT</pubDate><guid isPermaLink="false">Commented Issue: No exception thrown when observed expression is passed argument with invalid type [5203] 20091015032522P</guid></item><item><title>Commented Issue: No exception thrown when observed expression is passed argument with invalid type [5203]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5203</link><description>If an observed expression is passed a parameter that cannot be converted to the type the expression is expecting, no exception is thrown.  I would expect an InvalidTypeCastException to be thrown&amp;#59; otherwise, the bug is near impossible to track down.&lt;br /&gt;&lt;br /&gt;Here is an MS unit test to demonstrate the bug&amp;#58;&lt;br /&gt;&amp;#60;code&amp;#62;&lt;br /&gt;Imports System.Collections.Generic&lt;br /&gt;Imports Microsoft.VisualStudio.TestTools.UnitTesting&lt;br /&gt;Imports Obtics.Values&lt;br /&gt;&lt;br /&gt;&amp;#60;TestClass&amp;#40;&amp;#41;&amp;#62; Public Class ObticsBugTest&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub InvalidCastExceptionNotThrownForExpressionArgument&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim value &amp;#61; New Object&amp;#40;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim workingExpression &amp;#61; New TestExpressionTargetWithCorrectType&amp;#40;New Object&amp;#40;&amp;#41; &amp;#123;value&amp;#125;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim workingObservedCollection &amp;#61; ExpressionObserver.Execute&amp;#40;CType&amp;#40;workingExpression, Object&amp;#41;, _&lt;br /&gt;&amp;#9;&amp;#9; Function&amp;#40;source As IWorking&amp;#41; source.Values&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;1, workingObservedCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenExpression &amp;#61; New TestExpressionTargetWithoutCorrectType&amp;#40;New Object&amp;#40;&amp;#41; &amp;#123;value&amp;#125;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenObservedCollection &amp;#61; ExpressionObserver.Execute&amp;#40;CType&amp;#40;brokenExpression, IBase&amp;#41;, _&lt;br /&gt;&amp;#9;&amp;#9; Function&amp;#40;source As IWorking&amp;#41; source.Values&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;1, brokenObservedCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenExpression2 &amp;#61; New TestExpressionTargetWithoutCorrectType&amp;#40;New Object&amp;#40;&amp;#41; &amp;#123;value&amp;#125;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenObservedCollection2 &amp;#61; ExpressionObserver.Execute&amp;#40;CType&amp;#40;brokenExpression2, Object&amp;#41;, _&lt;br /&gt;&amp;#9;&amp;#9; Function&amp;#40;source As IWorking&amp;#41; source.Values&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;1, brokenObservedCollection2.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class TestExpressionTargetWithCorrectType&lt;br /&gt;&amp;#9;&amp;#9;Implements IWorking&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal values As IEnumerable&amp;#40;Of Object&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Values &amp;#61; values&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public ReadOnly Property Values&amp;#40;&amp;#41; As IEnumerable&amp;#40;Of Object&amp;#41; Implements IWorking.Values&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Values&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&amp;#9;&amp;#9;Private _Values As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class TestExpressionTargetWithoutCorrectType&lt;br /&gt;&amp;#9;&amp;#9;Implements IBase&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal values As IEnumerable&amp;#40;Of Object&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Values &amp;#61; values&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public ReadOnly Property Values&amp;#40;&amp;#41; As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Values&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&amp;#9;&amp;#9;Private _Values As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Interface IWorking&lt;br /&gt;&amp;#9;&amp;#9;Inherits IBase&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;ReadOnly Property Values&amp;#40;&amp;#41; As IEnumerable&amp;#40;Of Object&amp;#41;&lt;br /&gt;&amp;#9;End Interface&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Interface IBase&lt;br /&gt;&lt;br /&gt;&amp;#9;End Interface&lt;br /&gt;End Class&lt;br /&gt;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: Throb ** &lt;p&gt;The problem is that the order in which &amp;#40;sub&amp;#41;expressions are calculated is not precisely determined in Obtics. That is because change notification can come from everywhere. If you would take the &amp;#40;simplefied&amp;#41; example of this bit of code&amp;#58;&lt;/p&gt;&lt;p&gt;p.Value is Person &amp;#63; &amp;#40;&amp;#40;Person&amp;#41;p.Value&amp;#41;.Name &amp;#58; string.Empty&lt;/p&gt;&lt;p&gt;Beause the order is not precisely determined and suppose p.Value changes into something that is not a Person&amp;#59; it can happen that the second part of the &amp;#63;&amp;#58; operator is evaluated before the first part, which would result in an &amp;#40;unexpected&amp;#41; type cast exception.&lt;/p&gt;&lt;p&gt;The same issue holds for accessing members of null objects. This a fault in the design&amp;#59; sorry for that.&lt;/p&gt;&lt;p&gt;I understand your problem and I agree but it requires a different solution than throwing an exception. At least internaly values need to be propagated in a form simmilar to Nullable&amp;#60;T&amp;#62; say Checked&amp;#60;T&amp;#62;. It&amp;#39;s state could be either &amp;#39;Invalid&amp;#39; and why or &amp;#39;Valid&amp;#39; and a value. &lt;/p&gt;&lt;p&gt;My plan now is to &amp;#40;sometime&amp;#41; extend IValueProvider with a boolean Valid property and a Checked property, which would return the mentioned Checked&amp;#60;T&amp;#62; structure.&lt;/p&gt;&lt;p&gt;If this problem is truely bugging you&amp;#59; I can always use some help &amp;#58;-&amp;#41;&lt;/p&gt;</description><author>Throb</author><pubDate>Thu, 15 Oct 2009 09:59:37 GMT</pubDate><guid isPermaLink="false">Commented Issue: No exception thrown when observed expression is passed argument with invalid type [5203] 20091015095937A</guid></item><item><title>Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208]</title><link>http://obtics.codeplex.com/WorkItem/View.aspx?WorkItemId=5208</link><description>Here is a unit test for a bug I found.  The test called &amp;#34;Test_Control&amp;#34; works as expected.  However, the &amp;#34;Test_Broken&amp;#34; uses an object that has an overridden GetHashCode method, which causes the observed expression to break.&lt;br /&gt;&lt;br /&gt;While this example uses the &amp;#34;Custom GetHashCode&amp;#34; object as a parameter to Enumerable.Range, I have a feeling that this is also the same bug that exists in several other places throughout my application that use a &amp;#34;Custom GetHashCode&amp;#34; object in other ways.&lt;br /&gt;&lt;br /&gt;&amp;#60;code&amp;#62;&lt;br /&gt;Imports System.Collections.Generic&lt;br /&gt;Imports System.ComponentModel&lt;br /&gt;Imports System.Diagnostics&lt;br /&gt;Imports Microsoft.VisualStudio.TestTools.UnitTesting&lt;br /&gt;Imports Obtics.Values&lt;br /&gt;Imports System.Collections.Specialized&lt;br /&gt;&lt;br /&gt;&amp;#60;TestClass&amp;#40;&amp;#41;&amp;#62; Public Class ObticsBug_OverridingGetHashCodeBreaksEnumerable&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Control&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New WorkingRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New WorkingRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of WorkingRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#60;TestMethod&amp;#40;&amp;#41;&amp;#62; Public Sub Test_Broken&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRange &amp;#61; New BrokenRange&amp;#40;0, 1&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim testRangeCollection &amp;#61; New BrokenRange&amp;#40;&amp;#41; &amp;#123;testRange&amp;#125;&lt;br /&gt;&amp;#9;&amp;#9;Dim originalCount &amp;#61; 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Dim brokenCollection &amp;#61; ExpressionObserver.Execute&amp;#40;testRangeCollection, Function&amp;#40;source As IEnumerable&amp;#40;Of BrokenRange&amp;#41;&amp;#41; &amp;#40; _&lt;br /&gt;&amp;#9;&amp;#9; From first In source _&lt;br /&gt;&amp;#9;&amp;#9; From generatedDay In Enumerable.Range&amp;#40;first.Start, first.End - first.Start&amp;#41; _&lt;br /&gt;&amp;#9;&amp;#9; Select generatedDay _&lt;br /&gt;&amp;#9;&amp;#9; &amp;#41;&amp;#41;.Cascade&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Dim tryToBreakBrokenCollection &amp;#61; DirectCast&amp;#40;brokenCollection, INotifyCollectionChanged&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;AddHandler tryToBreakBrokenCollection.CollectionChanged, AddressOf OnResultCollectionChanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; originalCount&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;CHANGING START&amp;#34;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;testRange.Start &amp;#61; testRange.Start - 1&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Assert.AreEqual&amp;#40;originalCount &amp;#43; 1, brokenCollection.Count&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;Trace.WriteLine&amp;#40;&amp;#34;COUNT&amp;#61;&amp;#34; &amp;#38; &amp;#40;originalCount &amp;#43; 1&amp;#41;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Protected Overridable Sub OnResultCollectionChanged&amp;#40;ByVal sender As Object, ByVal e As System.Collections.Specialized.NotifyCollectionChangedEventArgs&amp;#41;&lt;br /&gt;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class WorkingRange&lt;br /&gt;&amp;#9;&amp;#9;Implements INotifyPropertyChanged&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; &amp;#91;end&amp;#93;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; start&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _End As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property &amp;#91;End&amp;#93;&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _End&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_End &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;End&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Private _Start As Integer&lt;br /&gt;&amp;#9;&amp;#9;Public Property Start&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Return _Start&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Get&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Set&amp;#40;ByVal value As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;_Start &amp;#61; value&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;RaiseEvent PropertyChanged&amp;#40;Me, New PropertyChangedEventArgs&amp;#40;&amp;#34;Start&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;End Set&lt;br /&gt;&amp;#9;&amp;#9;End Property&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Event PropertyChanged&amp;#40;ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs&amp;#41; Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;&lt;br /&gt;&amp;#9;Public Class BrokenRange&lt;br /&gt;&amp;#9;&amp;#9;Inherits WorkingRange&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Sub New&amp;#40;ByVal start As Integer, ByVal &amp;#91;end&amp;#93; As Integer&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;MyBase.New&amp;#40;start, &amp;#91;end&amp;#93;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;End Sub&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;Public Overrides Function GetHashCode&amp;#40;&amp;#41; As Integer&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim code As String &amp;#61; &amp;#34;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.Start.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; &amp;#34;&amp;#36;&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;code &amp;#43;&amp;#61; Me.End.GetHashCode&amp;#40;&amp;#41;.ToString&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Dim hashCode &amp;#61; code.GetHashCode&amp;#40;&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;Return hashCode&lt;br /&gt;&amp;#9;&amp;#9;End Function&lt;br /&gt;&amp;#9;End Class&lt;br /&gt;End Class&lt;br /&gt;&amp;#60;&amp;#47;code&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: Throb ** &lt;p&gt;I think you are being too complex. Getting a hashcode now becomes an expensive operation. Also I think your solution &amp;#39;works&amp;#39; because you are always returning the same hashcode for all objects. &amp;#40;which is not strictly speaking illegal but totaly beats the purpose of hashcodes&amp;#41;.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;</description><author>Throb</author><pubDate>Wed, 14 Oct 2009 08:00:48 GMT</pubDate><guid isPermaLink="false">Commented Issue: Overriding GetHashCode on object used in observed expression causes expression to not update after its INotifyCollectionChanged.CollectionChanged event has a handler [5208] 20091014080048A</guid></item></channel></rss>