Raven.Database.DocumentDatabase.DisableAllTriggersForCurrentThread C# (CSharp) Method

DisableAllTriggersForCurrentThread() public method

This API is provided solely for the use of bundles that might need to run without any other bundle interfering. Specifically, the replication bundle need to be able to run without interference from any other bundle.
public DisableAllTriggersForCurrentThread ( ) : IDisposable
return IDisposable
		public IDisposable DisableAllTriggersForCurrentThread()
		{
			if (disposed)
				return new DisposableAction(() => { });
			var old = disableAllTriggers.Value;
			disableAllTriggers.Value = true;
			return new DisposableAction(() => disableAllTriggers.Value = old);
		}