Пример #1
0
    /// <summary>
    /// Unsubscribe all subscription.
    /// </summary>
    public void Dispose()
    {
        if (IsDisposed)
        {
            return;
        }

        var node = _root;

        _root = _last = null;
        _mode = (ReactivePropertyMode)IsDisposedFlagNumber;

        while (node != null)
        {
            node.OnCompleted();
            node = node.Next;
        }

        ValidationTrigger.Dispose();
        SourceDisposable.Dispose();
        ValidateNotifyErrorSubscription.Dispose();
        if (ErrorsTrigger.IsValueCreated)
        {
            ErrorsTrigger.Value.OnCompleted();
            ErrorsTrigger.Value.Dispose();
        }
    }
        /// <summary>
        /// Unsubcribe all subscription.
        /// </summary>
        public void Dispose()
        {
            if (IsDisposed)
            {
                return;
            }

            IsDisposed = true;
            AnotherTrigger.Dispose();
            RaiseSubscription.Dispose();
            SourceDisposable.Dispose();
            ((IDisposable)ValidationTrigger).Dispose();
            ValidateNotifyErrorSubscription.Dispose();
            ErrorsTrigger.OnCompleted();
            ErrorsTrigger.Dispose();
        }
Пример #3
0
        /// <summary>
        /// Unsubcribe all subscription.
        /// </summary>
        public void Dispose()
        {
            if (IsDisposed) return;

            IsDisposed = true;
            this.Source.OnCompleted();
            this.Source.Dispose();
            this.ValidationTrigger.Dispose();
            SourceDisposable.Dispose();
            ValidateNotifyErrorSubscription.Dispose();
            if (ErrorsTrigger.IsValueCreated)
            {
                ErrorsTrigger.Value.OnCompleted();
                ErrorsTrigger.Value.Dispose();
            }
        }