/// <summary> /// Indicates that a file lock should be held throughout the logging process, /// maintaining an exclusive lock on the file. /// </summary> /// <returns>The current <see cref="FileAppenderDefinition"/> instance.</returns> public FileAppenderDefinition LockingExclusively() { _lockingModel = new FileAppender.ExclusiveLock(); return(this); }
/// <summary> /// Indicates that the provided custom locking model should be used. /// </summary> /// <typeparam name="TLockingModel">The custom locking model type.</typeparam> /// <returns>The current <see cref="FileAppenderDefinition"/> instance.</returns> public FileAppenderDefinition LockingWith <TLockingModel>() where TLockingModel : FileAppender.LockingModelBase, new() { _lockingModel = new TLockingModel(); return(this); }
/// <summary> /// Indicates that locking should be done on a per-write basis. This is considerably /// slower than an exclusive lock, but allows other processes to move or delete the /// file during logging. /// </summary> /// <returns>The current <see cref="FileAppenderDefinition"/> instance.</returns> public FileAppenderDefinition LockingMinimally() { _lockingModel = new FileAppender.MinimalLock(); return(this); }