Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:SqlWordFetcher" /> class.
        /// </summary>
        /// <param name="connection">An open database connection.</param>
        /// <param name="implementation">The method implementation.</param>
        public SqlWordFetcher(DbConnection connection, TryFindWord implementation)
        {
            if (connection == null)
            {
                throw new ArgumentNullException("connection");
            }
            if (implementation == null)
            {
                throw new ArgumentNullException("implementation");
            }

            this.connection     = connection;
            this.implementation = implementation;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:IndexConnector" /> class.
        /// </summary>
        /// <param name="getWordFetcher">The GetWordFetcher delegate.</param>
        /// <param name="getSize">The GetSize delegate.</param>
        /// <param name="getCount">The GetCount delegate.</param>
        /// <param name="clearIndex">The ClearIndex delegate.</param>
        /// <param name="deleteData">The DeleteDataForDocument delegate.</param>
        /// <param name="saveData">The SaveData delegate.</param>
        /// <param name="tryFindWord">The TryFindWord delegate.</param>
        public IndexConnector(GetWordFetcher getWordFetcher, GetSize getSize, GetCount getCount, ClearIndex clearIndex,
                              DeleteDataForDocument deleteData, SaveDataForDocument saveData, TryFindWord tryFindWord)
        {
            if (getWordFetcher == null)
            {
                throw new ArgumentNullException("getWordFetcher");
            }

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

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

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

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

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

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

            this.getWordFetcher = getWordFetcher;
            this.getSize        = getSize;
            this.getCount       = getCount;
            this.clearIndex     = clearIndex;
            this.deleteData     = deleteData;
            this.saveData       = saveData;
            this.tryFindWord    = tryFindWord;
        }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:IndexConnector" /> class.
        /// </summary>
        /// <param name="getWordFetcher">The GetWordFetcher delegate.</param>
        /// <param name="getSize">The GetSize delegate.</param>
        /// <param name="getCount">The GetCount delegate.</param>
        /// <param name="clearIndex">The ClearIndex delegate.</param>
        /// <param name="deleteData">The DeleteDataForDocument delegate.</param>
        /// <param name="saveData">The SaveData delegate.</param>
        /// <param name="tryFindWord">The TryFindWord delegate.</param>
        public IndexConnector(GetWordFetcher getWordFetcher, GetSize getSize, GetCount getCount, ClearIndex clearIndex,
            DeleteDataForDocument deleteData, SaveDataForDocument saveData, TryFindWord tryFindWord)
        {
            if(getWordFetcher == null) throw new ArgumentNullException("getWordFetcher");
            if(getSize == null) throw new ArgumentNullException("getSize");
            if(getCount == null) throw new ArgumentNullException("getCount");
            if(clearIndex == null) throw new ArgumentNullException("clearIndex");
            if(deleteData == null) throw new ArgumentNullException("deleteData");
            if(saveData == null) throw new ArgumentNullException("saveData");
            if(tryFindWord == null) throw new ArgumentNullException("tryFindWord");

            this.getWordFetcher = getWordFetcher;
            this.getSize = getSize;
            this.getCount = getCount;
            this.clearIndex = clearIndex;
            this.deleteData = deleteData;
            this.saveData = saveData;
            this.tryFindWord = tryFindWord;
        }
		/// <summary>
		/// Initializes a new instance of the <see cref="T:SqlWordFetcher" /> class.
		/// </summary>
		/// <param name="connection">An open database connection.</param>
		/// <param name="implementation">The method implementation.</param>
		public SqlWordFetcher(DbConnection connection, TryFindWord implementation) {
			if(connection == null) throw new ArgumentNullException("connection");
			if(implementation == null) throw new ArgumentNullException("implementation");

			this.connection = connection;
			this.implementation = implementation;
		}