Example #1
0
        private void RecordDisposable<T>(T result)
        {
            var disposable = result as IDisposable;
            if (disposable == null)
                return;

            if (recordDisposableObject != null)
                recordDisposableObject(disposable);
            else
                contentManager.RecordDisposable(disposable);
        }
Example #2
0
        private void RecordDisposable <T>(T result)
        {
            IDisposable disposable = result as IDisposable;

            if (disposable == null)
            {
                return;
            }
            if (recordDisposableObject != null)
            {
                recordDisposableObject(disposable);
            }
            else
            {
                contentManager.RecordDisposable(disposable);
            }
        }