コード例 #1
0
ファイル: Sink.cs プロジェクト: dblock/sncore
        private static void Configure(string filename)
        {
            SnCore.DomainMail.Configuration cnf = new SnCore.DomainMail.Configuration(filename);
            LogDebug(string.Format("Loaded configuration file \"{0}\".", filename));

            bool.TryParse(cnf["Debug"], out s_Debug);

            s_QueuePath = cnf["QueuePath"];

            if (string.IsNullOrEmpty(s_QueuePath))
            {
                s_QueuePath = Path.Combine(Path.GetTempPath(), "Queue");
            }

            if (!Directory.Exists(s_QueuePath)) Directory.CreateDirectory(s_QueuePath);
            LogDebug(string.Format("Queuing messages in \"{0}\".", s_QueuePath));
        }
コード例 #2
0
        private static void Configure(string filename)
        {
            SnCore.DomainMail.Configuration cnf = new SnCore.DomainMail.Configuration(filename);
            LogDebug(string.Format("Loaded configuration file \"{0}\".", filename));

            bool.TryParse(cnf["Debug"], out s_Debug);

            s_QueuePath = cnf["QueuePath"];

            if (string.IsNullOrEmpty(s_QueuePath))
            {
                s_QueuePath = Path.Combine(Path.GetTempPath(), "Queue");
            }

            if (!Directory.Exists(s_QueuePath))
            {
                Directory.CreateDirectory(s_QueuePath);
            }
            LogDebug(string.Format("Queuing messages in \"{0}\".", s_QueuePath));
        }