Exemplo n.º 1
0
 /// <summary>
 ///     Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     if (Interlocked.Exchange(ref _lazyContext, DataContext.Empty) == DataContext.Empty)
     {
         return;
     }
     OnDispose();
     BindingServiceProvider.BindingManager.Unregister(this);
     BindingUpdated   = null;
     BindingException = null;
     _behaviors.Clear();
     _sourceAccessor.Dispose();
     _targetAccessor.Dispose();
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     if (Interlocked.Exchange(ref _lazyContext, DataContext.Empty) == DataContext.Empty)
     {
         return;
     }
     OnDispose();
     BindingServiceProvider.BindingManager.Unregister(this);
     BindingUpdated = null;
     ((ICollection <IBindingBehavior>) this).Clear();
     _sourceAccessor.Dispose();
     _targetAccessor.Dispose();
     if (_targetAccessor.Source.Path.IsDebuggable)
     {
         DebugInfo("Binding disposed");
     }
 }