示例#1
0
 public void Initialize(RemoteIndex index)
 {
     Assert.ArgumentNotNull(index, "index");
     Assert.IsNotNull(index, "index");
     this._index = index;
     Assert.IsNotNull(this._database, "Database is not defined");
     Assert.IsNotNull(this._root, "Root item is not defined");
     IndexingManager.Provider.OnUpdateItem    += new EventHandler(this.Provider_OnUpdateItem);
     IndexingManager.Provider.OnRemoveItem    += new EventHandler(this.Provider_OnRemoveItem);
     IndexingManager.Provider.OnRemoveVersion += new EventHandler(this.Provider_OnRemoveVersion);
 }
        /// <summary>
        /// Initializes the specified index.
        /// </summary>
        /// <param name="index">The index.</param>
        public void Initialize(RemoteIndex index)
        {
            Assert.ArgumentNotNull(index, "index");
            Assert.IsNotNull(index, "index");

            this.remoteIndex = index;

            Assert.IsNotNull(this.targetDatabase, "Database is not defined");
            Assert.IsNotNull(this.root, "Root item is not defined");

            IndexingManager.Provider.OnUpdateItem    += this.Provider_OnUpdateItem;
            IndexingManager.Provider.OnRemoveItem    += this.Provider_OnRemoveItem;
            IndexingManager.Provider.OnRemoveVersion += this.Provider_OnRemoveVersion;
        }