/// <summary> /// Provides exception handling and auditing for a given function. /// </summary> /// <param name="task">The context, used for auditing exceptions that may occur.</param> /// <param name="action">The action to be invoked.</param> /// <param name="errorMessage">Returns an error message in case of an unhandled exception /// that is not derived from <see cref="VfsException"/>.</param> /// <returns>The result of the submitted <paramref name="action"/> function.</returns> protected virtual void SecureAction(FileSystemTask task, Action action, Func <string> errorMessage) { VfsUtil.SecureAction(task, action, errorMessage, Auditor); }
/// <summary> /// Provides exception handling and auditing for a given function. /// </summary> /// <param name="task">The context, used for auditing exceptions that may occur.</param> /// <param name="func">The function to be invoked.</param> /// <param name="errorMessage">Returns an error message in case of an unhandled exception /// that is not derived from <see cref="VfsException"/>.</param> /// <returns>The result of the submitted <paramref name="func"/> function.</returns> protected virtual T SecureFunc <T>(FileSystemTask task, Func <T> func, Func <string> errorMessage) { return(VfsUtil.SecureFunc(task, func, errorMessage, Auditor)); }