示例#1
0
文件: Bot.cs 项目: pjmagee/Nircbot
        /// <summary>
        /// Initializes a new instance of the <see cref="Bot"/> class.
        /// </summary>
        /// <param name="context">
        /// The context.
        /// </param>
        /// <param name="ircClientFactory">
        /// The ircClient factory.
        /// </param>
        public Bot(Context context, IIrcClientFactory ircClientFactory)
            : this()
        {
            Database.SetInitializer(new DropCreateDatabaseAlwaysStrategy());

            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            if (ircClientFactory == null)
            {
                throw new ArgumentNullException("ircClientFactory");
            }

            this.context = context;
            this.ircClientFactory = ircClientFactory;
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultUserService"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public DefaultUserService(Context context)
 {
     this.context = context;
 }