/// <summary>
/// Executes the boot sequence of the Repository by the passed <see cref="RepositoryStartSettings"/>.
/// </summary>
/// <example>
/// Use the following code in your tool or other outer application:
/// <code>
/// var startSettings = new RepositoryStartSettings
/// {
/// PluginsPath = pluginsPath, // Local directory path of plugins if it is different from your tool's path.
/// Console = Console.Out // Startup sequence will be traced to given writer.
/// };
/// using (SenseNet.ContentRepository.Repository.Start(startSettings))
/// {
/// // your code
/// }
/// </code>
/// </example>
/// <remarks>
/// Repository will be stopped if the returned <see cref="RepositoryStartSettings"/> instance is disposed.
/// </remarks>
/// <returns>A new IDisposable <see cref="RepositoryInstance"/> instance.</returns>
/// <returns></returns>
public static RepositoryInstance Start(RepositoryStartSettings settings)
{
var instance = RepositoryInstance.Start(settings);
SystemAccount.Execute(() => Root);
return(instance);
}