コード例 #1
0
ファイル: IrcPlugin.cs プロジェクト: seaboy1234/c-raft
        private void GenerateNewConfigurationFile()
        {
            _logger.Log(LogLevel.Debug, Name, "Creating a new configuration file");
            IrcPluginConfiguration config = new IrcPluginConfiguration();

            config.Enabled  = false;
            config.Server   = "irc.esper.net";
            config.Channel  = "#C#raft";
            config.Nickname = "ChraftBot";
            config.Port     = 6667;

            XmlSerializer serializer = new XmlSerializer(typeof(IrcPluginConfiguration));
            TextWriter    textWriter = new StreamWriter(ConfigurationFilename);

            serializer.Serialize(textWriter, config);
            textWriter.Close();
        }
コード例 #2
0
ファイル: IrcPlugin.cs プロジェクト: Nirad/c-raft
        private void GenerateNewConfigurationFile()
        {
            _logger.Log(LogLevel.Debug, Name, "Creating a new configuration file");
            IrcPluginConfiguration config = new IrcPluginConfiguration();
            config.Enabled = false;
            config.Server = "irc.esper.net";
            config.Channel = "#C#raft";
            config.Nickname = "ChraftBot";
            config.Port = 6667;

            XmlSerializer serializer = new XmlSerializer(typeof(IrcPluginConfiguration));
            TextWriter textWriter = new StreamWriter(ConfigurationFilename);
            serializer.Serialize(textWriter, config);
            textWriter.Close();
        }