예제 #1
0
        /// <summary>
        /// Show a message if the specified <see cref="ICheckedDisposable" /> is not disposed.
        /// </summary>
        /// <param name="disposable">The <see cref="ICheckedDisposable" /> to check.</param>
        /// <param name="name">The name of the <see cref="ICheckedDisposable" /> .</param>
        /// <returns>
        /// True only if the assert condition passed. Otherwise false.
        /// </returns>
        /// <exception cref="System.NullReferenceException"></exception>
        public bool IsDisposed(ICheckedDisposable disposable, string name)
        {
            if (disposable == null)
            {
                throw new NullReferenceException();
            }

            return(this.Check(
                       AssertType.IsDisposed,
                       disposable.IsDisposed,
                       name,
                       null,
                       "IsDisposed check failed. [{0}]",
                       disposable));
        }
예제 #2
0
 public bool IsNotDisposed(ICheckedDisposable disposable, string name)
 {
     return(true);
 }