Example #1
0
        public static void All_Null_Throws(Try <string, Version> @try)
        {
            var actual = Record.Exception(() => @try.All(predicate: null));

            var ane = Assert.IsType <ArgumentNullException>(actual);

            Assert.Contains("predicate", ane.Message, Ordinal);
        }
Example #2
0
        private void Dispose(bool disposing)
        {
            if (_isDisposed || !disposing)
            {
                return;
            }

            DoSafeRelease();

            Try.All(
                () =>
            {
                var subscriptions = _subscriptions.Values.Cast <IDisposable>().ToArray();
                _subscriptions.Clear();
                Try.DisposeAll(subscriptions);
            },
                () =>
            {
                Try.DisposeAll(_eventMediator, _opMediator, _sync);
                _eventMediator = null;
                _opMediator    = null;
                _sync          = null;
            });
        }