Permalink
Browse files

Fixing indentation in Raven.Server

Consistently use tabs for indentation instead of spaces
  • Loading branch information...
1 parent 3ff777d commit c0ec1d95795821bec9ef0dc35ee8e76209be69a9 Tobias Grimm committed Aug 29, 2011
Showing with 399 additions and 399 deletions.
  1. +298 −298 Raven.Server/Program.cs
  2. +47 −47 Raven.Server/ProjectInstaller.Designer.cs
  3. +24 −24 Raven.Server/ProjectInstaller.cs
  4. +30 −30 Raven.Server/RavenService.Designer.cs
View
596 Raven.Server/Program.cs
@@ -21,232 +21,232 @@
namespace Raven.Server
{
- public static class Program
- {
- private static void Main(string[] args)
- {
- if (RunningInInteractiveMode())
- {
- try
- {
- InteractiveRun(args);
- }
- catch (ReflectionTypeLoadException e)
- {
- EmitWarningInRed();
-
- Console.WriteLine(e);
- foreach (var loaderException in e.LoaderExceptions)
- {
- Console.WriteLine("- - - -");
- Console.WriteLine(loaderException);
- }
-
- WaitForUserInputAndExitWithError();
- }
- catch (Exception e)
- {
- EmitWarningInRed();
-
- Console.WriteLine(e);
-
- WaitForUserInputAndExitWithError();
- }
- }
- else
- {
- // no try catch here, we want the exception to be logged by Windows
- ServiceBase.Run(new RavenService());
- }
- }
-
- private static bool RunningInInteractiveMode()
- {
+ public static class Program
+ {
+ private static void Main(string[] args)
+ {
+ if (RunningInInteractiveMode())
+ {
+ try
+ {
+ InteractiveRun(args);
+ }
+ catch (ReflectionTypeLoadException e)
+ {
+ EmitWarningInRed();
+
+ Console.WriteLine(e);
+ foreach (var loaderException in e.LoaderExceptions)
+ {
+ Console.WriteLine("- - - -");
+ Console.WriteLine(loaderException);
+ }
+
+ WaitForUserInputAndExitWithError();
+ }
+ catch (Exception e)
+ {
+ EmitWarningInRed();
+
+ Console.WriteLine(e);
+
+ WaitForUserInputAndExitWithError();
+ }
+ }
+ else
+ {
+ // no try catch here, we want the exception to be logged by Windows
+ ServiceBase.Run(new RavenService());
+ }
+ }
+
+ private static bool RunningInInteractiveMode()
+ {
if (Type.GetType("Mono.Runtime") != null) // running on mono, which doesn't support detecting this
return true;
- return Environment.UserInteractive;
- }
-
- private static void WaitForUserInputAndExitWithError()
- {
- Console.WriteLine("Press any key to continue...");
- Console.ReadKey(true);
- Environment.Exit(-1);
- }
-
- private static void EmitWarningInRed()
- {
- var old = Console.ForegroundColor;
- Console.ForegroundColor = ConsoleColor.Red;
- Console.WriteLine("A critical error occurred while starting the server. Please see the exception details bellow for more details:");
- Console.ForegroundColor = old;
- }
-
- private static void InteractiveRun(string[] args)
- {
- string backupLocation = null;
- string restoreLocation = null;
- Action actionToTake = null;
- bool launchBrowser = false;
+ return Environment.UserInteractive;
+ }
+
+ private static void WaitForUserInputAndExitWithError()
+ {
+ Console.WriteLine("Press any key to continue...");
+ Console.ReadKey(true);
+ Environment.Exit(-1);
+ }
+
+ private static void EmitWarningInRed()
+ {
+ var old = Console.ForegroundColor;
+ Console.ForegroundColor = ConsoleColor.Red;
+ Console.WriteLine("A critical error occurred while starting the server. Please see the exception details bellow for more details:");
+ Console.ForegroundColor = old;
+ }
+
+ private static void InteractiveRun(string[] args)
+ {
+ string backupLocation = null;
+ string restoreLocation = null;
+ Action actionToTake = null;
+ bool launchBrowser = false;
var ravenConfiguration = new RavenConfiguration();
- OptionSet optionSet = null;
- optionSet = new OptionSet
- {
+ OptionSet optionSet = null;
+ optionSet = new OptionSet
+ {
{"config=", "The config section to use", path => ravenConfiguration.LoadFrom(path)},
- {"install", "Installs the RavenDB service", key => actionToTake= () => AdminRequired(InstallAndStart, key)},
- {"uninstall", "Uninstalls the RavenDB service", key => actionToTake= () => AdminRequired(EnsureStoppedAndUninstall, key)},
- {"start", "Starts the RavenDB servce", key => actionToTake= () => AdminRequired(StartService, key)},
- {"restart", "Restarts the RavenDB service", key => actionToTake= () => AdminRequired(RestartService, key)},
- {"stop", "Stops the RavenDB service", key => actionToTake= () => AdminRequired(StopService, key)},
- {"ram", "Run RavenDB in RAM only", key =>
- {
- ravenConfiguration.Settings["Raven/RunInMemory"] = "true";
- ravenConfiguration.RunInMemory = true;
+ {"install", "Installs the RavenDB service", key => actionToTake= () => AdminRequired(InstallAndStart, key)},
+ {"uninstall", "Uninstalls the RavenDB service", key => actionToTake= () => AdminRequired(EnsureStoppedAndUninstall, key)},
+ {"start", "Starts the RavenDB servce", key => actionToTake= () => AdminRequired(StartService, key)},
+ {"restart", "Restarts the RavenDB service", key => actionToTake= () => AdminRequired(RestartService, key)},
+ {"stop", "Stops the RavenDB service", key => actionToTake= () => AdminRequired(StopService, key)},
+ {"ram", "Run RavenDB in RAM only", key =>
+ {
+ ravenConfiguration.Settings["Raven/RunInMemory"] = "true";
+ ravenConfiguration.RunInMemory = true;
actionToTake = () => RunInDebugMode(AnonymousUserAccessMode.All, ravenConfiguration, launchBrowser);
- }},
- {"debug", "Runs RavenDB in debug mode", key => actionToTake = () => RunInDebugMode(null, ravenConfiguration, launchBrowser)},
+ }},
+ {"debug", "Runs RavenDB in debug mode", key => actionToTake = () => RunInDebugMode(null, ravenConfiguration, launchBrowser)},
{"browser|launchbrowser", "After the server starts, launches the browser", key => launchBrowser = true},
- {"help", "Help about the command line interface", key =>
- {
+ {"help", "Help about the command line interface", key =>
+ {
actionToTake = () => PrintUsage(optionSet);
- }},
- {"restore",
- "Restores a RavenDB database from backup",
- key => actionToTake = () =>
- {
- if(backupLocation == null || restoreLocation == null)
- {
- throw new OptionException("when using restore, source and destination must be specified", "restore");
- }
- RunRestoreOperation(backupLocation, restoreLocation);
- }},
- {"dest=|destination=", "The {0:path} of the new new database", value => restoreLocation = value},
- {"src=|source=", "The {0:path} of the backup", value => backupLocation = value},
- };
-
-
- try
- {
+ }},
+ {"restore",
+ "Restores a RavenDB database from backup",
+ key => actionToTake = () =>
+ {
+ if(backupLocation == null || restoreLocation == null)
+ {
+ throw new OptionException("when using restore, source and destination must be specified", "restore");
+ }
+ RunRestoreOperation(backupLocation, restoreLocation);
+ }},
+ {"dest=|destination=", "The {0:path} of the new new database", value => restoreLocation = value},
+ {"src=|source=", "The {0:path} of the backup", value => backupLocation = value},
+ };
+
+
+ try
+ {
if(args.Length == 0) // we default to executing in debug mode
args = new[]{"--debug"};
- optionSet.Parse(args);
- }
- catch (Exception e)
- {
- Console.WriteLine(e.Message);
- PrintUsage(optionSet);
- return;
- }
+ optionSet.Parse(args);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.Message);
+ PrintUsage(optionSet);
+ return;
+ }
if (actionToTake == null)
actionToTake = () => PrintUsage(optionSet);
actionToTake();
- }
-
- private static void RunRestoreOperation(string backupLocation, string databaseLocation)
- {
- try
- {
- var ravenConfiguration = new RavenConfiguration();
- if(File.Exists(Path.Combine(backupLocation, "Raven.ravendb")))
- {
- ravenConfiguration.DefaultStorageTypeName =
- "Raven.Storage.Managed.TransactionalStorage, Raven.Storage.Managed";
- }
- else if(Directory.Exists(Path.Combine(backupLocation, "new")))
- {
- ravenConfiguration.DefaultStorageTypeName = "Raven.Storage.Esent.TransactionalStorage, Raven.Storage.Esent";
-
- }
- DocumentDatabase.Restore(ravenConfiguration, backupLocation, databaseLocation);
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- }
-
- private static void AdminRequired(Action actionThatMayRequiresAdminPrivileges, string cmdLine)
- {
- var principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
- if (principal.IsInRole(WindowsBuiltInRole.Administrator) == false)
- {
- if (RunAgainAsAdmin(cmdLine))
- return;
- }
- actionThatMayRequiresAdminPrivileges();
- }
-
- private static bool RunAgainAsAdmin(string cmdLine)
- {
- try
- {
- var process = Process.Start(new ProcessStartInfo
- {
- Arguments = "--" + cmdLine,
- FileName = Assembly.GetExecutingAssembly().Location,
- Verb = "runas",
- });
- process.WaitForExit();
- return true;
- }
- catch (Exception)
- {
- return false;
- }
- }
-
- private static void RunInDebugMode(AnonymousUserAccessMode? anonymousUserAccessMode, RavenConfiguration ravenConfiguration, bool launchBrowser)
- {
- ConfigureDebugLogging();
-
- NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(ravenConfiguration.Port);
- if (anonymousUserAccessMode.HasValue)
- ravenConfiguration.AnonymousUserAccessMode = anonymousUserAccessMode.Value;
+ }
+
+ private static void RunRestoreOperation(string backupLocation, string databaseLocation)
+ {
+ try
+ {
+ var ravenConfiguration = new RavenConfiguration();
+ if(File.Exists(Path.Combine(backupLocation, "Raven.ravendb")))
+ {
+ ravenConfiguration.DefaultStorageTypeName =
+ "Raven.Storage.Managed.TransactionalStorage, Raven.Storage.Managed";
+ }
+ else if(Directory.Exists(Path.Combine(backupLocation, "new")))
+ {
+ ravenConfiguration.DefaultStorageTypeName = "Raven.Storage.Esent.TransactionalStorage, Raven.Storage.Esent";
+
+ }
+ DocumentDatabase.Restore(ravenConfiguration, backupLocation, databaseLocation);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ }
+ }
+
+ private static void AdminRequired(Action actionThatMayRequiresAdminPrivileges, string cmdLine)
+ {
+ var principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
+ if (principal.IsInRole(WindowsBuiltInRole.Administrator) == false)
+ {
+ if (RunAgainAsAdmin(cmdLine))
+ return;
+ }
+ actionThatMayRequiresAdminPrivileges();
+ }
+
+ private static bool RunAgainAsAdmin(string cmdLine)
+ {
+ try
+ {
+ var process = Process.Start(new ProcessStartInfo
+ {
+ Arguments = "--" + cmdLine,
+ FileName = Assembly.GetExecutingAssembly().Location,
+ Verb = "runas",
+ });
+ process.WaitForExit();
+ return true;
+ }
+ catch (Exception)
+ {
+ return false;
+ }
+ }
+
+ private static void RunInDebugMode(AnonymousUserAccessMode? anonymousUserAccessMode, RavenConfiguration ravenConfiguration, bool launchBrowser)
+ {
+ ConfigureDebugLogging();
+
+ NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(ravenConfiguration.Port);
+ if (anonymousUserAccessMode.HasValue)
+ ravenConfiguration.AnonymousUserAccessMode = anonymousUserAccessMode.Value;
while (RunServerInDebugMode(ravenConfiguration, launchBrowser))
- {
- launchBrowser = false;
- }
- }
-
- private static void ConfigureDebugLogging()
- {
- var nlogPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "NLog.config");
- if (File.Exists(nlogPath))
+ {
+ launchBrowser = false;
+ }
+ }
+
+ private static void ConfigureDebugLogging()
+ {
+ var nlogPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "NLog.config");
+ if (File.Exists(nlogPath))
return;// that overrides the default config
using (var stream = typeof(Program).Assembly.GetManifestResourceStream("Raven.Server.DefaultLogging.config"))
using (var reader = XmlReader.Create(stream))
{
NLog.LogManager.Configuration = new XmlLoggingConfiguration(reader, "default-config");
}
- }
+ }
- private static bool RunServerInDebugMode(RavenConfiguration ravenConfiguration, bool lauchBrowser)
- {
- var sp = Stopwatch.StartNew();
- using (var server = new RavenDbServer(ravenConfiguration))
- {
+ private static bool RunServerInDebugMode(RavenConfiguration ravenConfiguration, bool lauchBrowser)
+ {
+ var sp = Stopwatch.StartNew();
+ using (var server = new RavenDbServer(ravenConfiguration))
+ {
sp.Stop();
- var path = Path.Combine(Environment.CurrentDirectory, "default.raven");
- if (File.Exists(path))
- {
- Console.WriteLine("Loading data from: {0}", path);
- Smuggler.Smuggler.ImportData(ravenConfiguration.ServerUrl, path);
- }
-
- Console.WriteLine("Raven is ready to process requests. Build {0}, Version {1}", DocumentDatabase.BuildVersion, DocumentDatabase.ProductVersion);
- Console.WriteLine("Server started in {0:#,#} ms", sp.ElapsedMilliseconds);
+ var path = Path.Combine(Environment.CurrentDirectory, "default.raven");
+ if (File.Exists(path))
+ {
+ Console.WriteLine("Loading data from: {0}", path);
+ Smuggler.Smuggler.ImportData(ravenConfiguration.ServerUrl, path);
+ }
+
+ Console.WriteLine("Raven is ready to process requests. Build {0}, Version {1}", DocumentDatabase.BuildVersion, DocumentDatabase.ProductVersion);
+ Console.WriteLine("Server started in {0:#,#} ms", sp.ElapsedMilliseconds);
Console.WriteLine("Data directory: {0}", ravenConfiguration.DataDirectory);
- Console.WriteLine("HostName: {0} Port: {1}, Storage: {2}", ravenConfiguration.HostName ?? "<any>",
+ Console.WriteLine("HostName: {0} Port: {1}, Storage: {2}", ravenConfiguration.HostName ?? "<any>",
ravenConfiguration.Port,
server.Database.TransactionalStorage.FriendlyName);
- Console.WriteLine("Server Url: {0}", ravenConfiguration.ServerUrl);
- Console.WriteLine("Press <enter> to stop or 'cls' and <enter> to clear the log");
+ Console.WriteLine("Server Url: {0}", ravenConfiguration.ServerUrl);
+ Console.WriteLine("Press <enter> to stop or 'cls' and <enter> to clear the log");
if(lauchBrowser)
{
try
@@ -258,117 +258,117 @@ private static bool RunServerInDebugMode(RavenConfiguration ravenConfiguration,
Console.WriteLine("Could not start browser: " + e.Message);
}
}
- while (true)
- {
- var readLine = Console.ReadLine() ?? "";
- switch (readLine.ToLowerInvariant())
- {
- case "cls":
- Console.Clear();
- break;
- case "reset":
- Console.Clear();
- return true;
- default:
- return false;
- }
- }
- }
- }
-
- private static void PrintUsage(OptionSet optionSet)
- {
- Console.WriteLine(
- @"
+ while (true)
+ {
+ var readLine = Console.ReadLine() ?? "";
+ switch (readLine.ToLowerInvariant())
+ {
+ case "cls":
+ Console.Clear();
+ break;
+ case "reset":
+ Console.Clear();
+ return true;
+ default:
+ return false;
+ }
+ }
+ }
+ }
+
+ private static void PrintUsage(OptionSet optionSet)
+ {
+ Console.WriteLine(
+ @"
Raven DB
Document Database for the .Net Platform
----------------------------------------
Copyright (C) 2008 - {0} - Hibernating Rhinos
----------------------------------------
Command line ptions:",
- SystemTime.Now.Year);
+ SystemTime.Now.Year);
optionSet.WriteOptionDescriptions(Console.Out);
- Console.WriteLine(@"
+ Console.WriteLine(@"
Enjoy...
");
- }
-
- private static void EnsureStoppedAndUninstall()
- {
- if (ServiceIsInstalled() == false)
- {
- Console.WriteLine("Service is not installed");
- }
- else
- {
- var stopController = new ServiceController(ProjectInstaller.SERVICE_NAME);
-
- if (stopController.Status == ServiceControllerStatus.Running)
- stopController.Stop();
-
- ManagedInstallerClass.InstallHelper(new[] { "/u", Assembly.GetExecutingAssembly().Location });
- }
- }
-
- private static void StopService()
- {
- var stopController = new ServiceController(ProjectInstaller.SERVICE_NAME);
-
- if (stopController.Status == ServiceControllerStatus.Running)
- {
- stopController.Stop();
- stopController.WaitForStatus(ServiceControllerStatus.Stopped);
- }
- }
-
-
- private static void StartService()
- {
- var stopController = new ServiceController(ProjectInstaller.SERVICE_NAME);
-
- if (stopController.Status != ServiceControllerStatus.Running)
- {
- stopController.Start();
- stopController.WaitForStatus(ServiceControllerStatus.Running);
- }
- }
-
- private static void RestartService()
- {
- var stopController = new ServiceController(ProjectInstaller.SERVICE_NAME);
-
- if (stopController.Status == ServiceControllerStatus.Running)
- {
- stopController.Stop();
- stopController.WaitForStatus(ServiceControllerStatus.Stopped);
- }
- if (stopController.Status != ServiceControllerStatus.Running)
- {
- stopController.Start();
- stopController.WaitForStatus(ServiceControllerStatus.Running);
- }
-
- }
-
- private static void InstallAndStart()
- {
- if (ServiceIsInstalled())
- {
- Console.WriteLine("Service is already installed");
- }
- else
- {
- ManagedInstallerClass.InstallHelper(new[] { Assembly.GetExecutingAssembly().Location });
- var startController = new ServiceController(ProjectInstaller.SERVICE_NAME);
- startController.Start();
- }
- }
-
- private static bool ServiceIsInstalled()
- {
- return (ServiceController.GetServices().Count(s => s.ServiceName == ProjectInstaller.SERVICE_NAME) > 0);
- }
- }
+ }
+
+ private static void EnsureStoppedAndUninstall()
+ {
+ if (ServiceIsInstalled() == false)
+ {
+ Console.WriteLine("Service is not installed");
+ }
+ else
+ {
+ var stopController = new ServiceController(ProjectInstaller.SERVICE_NAME);
+
+ if (stopController.Status == ServiceControllerStatus.Running)
+ stopController.Stop();
+
+ ManagedInstallerClass.InstallHelper(new[] { "/u", Assembly.GetExecutingAssembly().Location });
+ }
+ }
+
+ private static void StopService()
+ {
+ var stopController = new ServiceController(ProjectInstaller.SERVICE_NAME);
+
+ if (stopController.Status == ServiceControllerStatus.Running)
+ {
+ stopController.Stop();
+ stopController.WaitForStatus(ServiceControllerStatus.Stopped);
+ }
+ }
+
+
+ private static void StartService()
+ {
+ var stopController = new ServiceController(ProjectInstaller.SERVICE_NAME);
+
+ if (stopController.Status != ServiceControllerStatus.Running)
+ {
+ stopController.Start();
+ stopController.WaitForStatus(ServiceControllerStatus.Running);
+ }
+ }
+
+ private static void RestartService()
+ {
+ var stopController = new ServiceController(ProjectInstaller.SERVICE_NAME);
+
+ if (stopController.Status == ServiceControllerStatus.Running)
+ {
+ stopController.Stop();
+ stopController.WaitForStatus(ServiceControllerStatus.Stopped);
+ }
+ if (stopController.Status != ServiceControllerStatus.Running)
+ {
+ stopController.Start();
+ stopController.WaitForStatus(ServiceControllerStatus.Running);
+ }
+
+ }
+
+ private static void InstallAndStart()
+ {
+ if (ServiceIsInstalled())
+ {
+ Console.WriteLine("Service is already installed");
+ }
+ else
+ {
+ ManagedInstallerClass.InstallHelper(new[] { Assembly.GetExecutingAssembly().Location });
+ var startController = new ServiceController(ProjectInstaller.SERVICE_NAME);
+ startController.Start();
+ }
+ }
+
+ private static bool ServiceIsInstalled()
+ {
+ return (ServiceController.GetServices().Count(s => s.ServiceName == ProjectInstaller.SERVICE_NAME) > 0);
+ }
+ }
}
View
94 Raven.Server/ProjectInstaller.Designer.cs
@@ -5,57 +5,57 @@
//-----------------------------------------------------------------------
namespace Raven.Server
{
- partial class ProjectInstaller
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
+ partial class ProjectInstaller
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
- #region Component Designer generated code
+ #region Component Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
- this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
- //
- // serviceProcessInstaller1
- //
- this.serviceProcessInstaller1.Password = null;
- this.serviceProcessInstaller1.Username = null;
- //
- // serviceInstaller1
- //
- this.serviceInstaller1.ServiceName = "RavenDB";
- //
- // ProjectInstaller
- //
- this.Installers.AddRange(new System.Configuration.Install.Installer[] {
- this.serviceProcessInstaller1,
- this.serviceInstaller1});
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
+ this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
+ //
+ // serviceProcessInstaller1
+ //
+ this.serviceProcessInstaller1.Password = null;
+ this.serviceProcessInstaller1.Username = null;
+ //
+ // serviceInstaller1
+ //
+ this.serviceInstaller1.ServiceName = "RavenDB";
+ //
+ // ProjectInstaller
+ //
+ this.Installers.AddRange(new System.Configuration.Install.Installer[] {
+ this.serviceProcessInstaller1,
+ this.serviceInstaller1});
- }
+ }
- #endregion
+ #endregion
- private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1;
- private System.ServiceProcess.ServiceInstaller serviceInstaller1;
- }
+ private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1;
+ private System.ServiceProcess.ServiceInstaller serviceInstaller1;
+ }
}
View
48 Raven.Server/ProjectInstaller.cs
@@ -10,33 +10,33 @@
namespace Raven.Server
{
- [RunInstaller(true)]
- public partial class ProjectInstaller : Installer
- {
- internal const string SERVICE_NAME = "RavenDB";
+ [RunInstaller(true)]
+ public partial class ProjectInstaller : Installer
+ {
+ internal const string SERVICE_NAME = "RavenDB";
- public ProjectInstaller()
- {
- InitializeComponent();
+ public ProjectInstaller()
+ {
+ InitializeComponent();
- ServiceName = SERVICE_NAME;
+ ServiceName = SERVICE_NAME;
- this.serviceInstaller1.StartType = ServiceStartMode.Automatic;
+ this.serviceInstaller1.StartType = ServiceStartMode.Automatic;
- this.serviceProcessInstaller1.Account = ServiceAccount.LocalSystem;
- }
+ this.serviceProcessInstaller1.Account = ServiceAccount.LocalSystem;
+ }
- public string ServiceName
- {
- get
- {
- return serviceInstaller1.DisplayName;
- }
- set
- {
- serviceInstaller1.DisplayName = value;
- serviceInstaller1.ServiceName = value;
- }
- }
- }
+ public string ServiceName
+ {
+ get
+ {
+ return serviceInstaller1.DisplayName;
+ }
+ set
+ {
+ serviceInstaller1.DisplayName = value;
+ serviceInstaller1.ServiceName = value;
+ }
+ }
+ }
}
View
60 Raven.Server/RavenService.Designer.cs
@@ -5,38 +5,38 @@
//-----------------------------------------------------------------------
namespace Raven.Server
{
- partial class RavenService
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
+ partial class RavenService
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
- #region Component Designer generated code
+ #region Component Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- components = new System.ComponentModel.Container();
- this.ServiceName = "RavenService";
- }
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ this.ServiceName = "RavenService";
+ }
- #endregion
- }
+ #endregion
+ }
}

0 comments on commit c0ec1d9

Please sign in to comment.