Пример #1
0
        private void Fetch([Inject] DisposableClass disposable)
        {
            DisposableClass = disposable;

            if (disposable.IsDisposed)
            {
                throw new ObjectDisposedException(nameof(disposable));
            }
        }
Пример #2
0
        private void Fetch([Inject] DisposableClass disposable, [Inject] IDataPortal <ClassB> classBDataPortal)
        {
            DisposableClass = disposable;

            if (disposable.IsDisposed)
            {
                throw new ObjectDisposedException(nameof(disposable));
            }

            ChildB = classBDataPortal.Fetch();

            if (disposable.IsDisposed)
            {
                throw new ObjectDisposedException(nameof(disposable));
            }
        }