Beispiel #1
0
        /// <summary>
        /// Resumes the object completely for only a short time. Thus, if object was suspended before, it will be suspended again when the function returns.
        /// </summary>
        public override void ResumeCompleteTemporarily()
        {
            var result = new TemporaryResumeToken(this);

            result.ResumeTemporarily();
            result.Dispose();
        }
Beispiel #2
0
        /// <summary>
        /// Resumes the events of this class as long as you hold the returned resume token. The original state (the suspenended state) is restored when you dispose the resume token.
        /// </summary>
        public IDisposable ResumeShortlyGetToken()
        {
            var token = new TemporaryResumeToken(this);

            token.ResumeTemporarily();
            return(token);
        }
Beispiel #3
0
        /// <summary>
        /// Resumes the object  completely for the time the returned token is referenced and not disposed.
        /// The return value is a token that had 'absorbed' the suspend count of the object, resulting in the suspend count
        /// of the object dropped to 0 (zero). When the returned token is finally disposed, the suspend count of the object is increased again by the 'absorbed' suspend count.
        /// </summary>
        /// <returns>A new token. As long as this token is not disposed, and not other process calls SuspendGetToken, the object is fre (not suspended). The object is suspended again when
        /// the returned token is disposed.</returns>
        public override IDisposable ResumeCompleteTemporarilyGetToken()
        {
            var result = new TemporaryResumeToken(this);

            result.ResumeTemporarily();
            return(result);
        }
Beispiel #4
0
            public void ResumeCompleteTemporarily()
            {
                var parent = _parent;

                if (null == parent)
                {
                    throw new ObjectDisposedException("This token is already disposed");
                }

                var result = new TemporaryResumeToken(parent);

                result.ResumeTemporarily();
                result.Dispose();
            }
		/// <summary>
		/// Resumes the object completely for only a short time. Thus, if object was suspended before, it will be suspended again when the function returns.
		/// </summary>
		public override void ResumeCompleteTemporarily()
		{
			var result = new TemporaryResumeToken(this);
			result.ResumeTemporarily();
			result.Dispose();
		}
		/// <summary>
		/// Resumes the object  completely for the time the returned token is referenced and not disposed.
		/// The return value is a token that had 'absorbed' the suspend count of the object, resulting in the suspend count
		/// of the object dropped to 0 (zero). When the returned token is finally disposed, the suspend count of the object is increased again by the 'absorbed' suspend count.
		/// </summary>
		/// <returns>A new token. As long as this token is not disposed, and not other process calls SuspendGetToken, the object is fre (not suspended). The object is suspended again when
		/// the returned token is disposed.</returns>
		public override IDisposable ResumeCompleteTemporarilyGetToken()
		{
			var result = new TemporaryResumeToken(this);
			result.ResumeTemporarily();
			return result;
		}
			public void ResumeCompleteTemporarily()
			{
				var parent = _parent;
				if (null == parent)
					throw new ObjectDisposedException("This token is already disposed");

				var result = new TemporaryResumeToken(parent);
				result.ResumeTemporarily();
				result.Dispose();
			}
Beispiel #8
0
		/// <summary>
		/// Resumes the events of this class as long as you hold the returned resume token. The original state (the suspenended state) is restored when you dispose the resume token.
		/// </summary>
		public IDisposable ResumeShortlyGetToken()
		{
			var token = new TemporaryResumeToken(this);
			token.ResumeTemporarily();
			return token;
		}