public void Start(String storageName, Boolean isDebugMode, DaemonNT.Configuration.Settings settings)
        {
            OnStartTraceLoggerStorageArgs args = new OnStartTraceLoggerStorageArgs();
            args.StorageName = storageName;
            args.IsDebugMode = isDebugMode;
            args.Settings = settings;

            storage.Start(args);
        }
Esempio n. 2
0
        /// <summary>
        /// Starts the service.
        /// </summary>
        /// <remarks>
        /// OnStart() hook methods (from this and/or derived classes) are
        /// called upon starting the service.
        /// </remarks>
        /// <param name="serviceName">Service name. Must not be null.</param>
        /// <param name="isDebugMode">Indicates whether the service should run
        /// in debug mode (true) or as a true NT service (false).</param>
        /// <param name="logger">Instance of logger. Must not be null.</param>
        /// <param name="settings">Service settings. Must not be null.</param>
        internal void Start(
            string serviceName,
            bool isDebugMode,
            DaemonNT.Logging.Logger logger,
            DaemonNT.Configuration.Settings settings)
        {
            // prepare start args
            OnStartServiceArgs args = new OnStartServiceArgs()
            {
                ServiceName = serviceName,
                IsDebugMode = isDebugMode,
                Settings = settings
            };

            // start service
            this.Logger.Event.LogInfo(string.Format(
                "The '{0}' service is being started...", args.ServiceName));

            this.OnStart(args);

            this.Logger.Event.LogInfo(string.Format(
                "The '{0}' service has beed started successfully!",
                args.ServiceName));
        }