Exemplo n.º 1
0
        /// <summary>
        /// The begin scan.
        /// </summary>
        /// <param name="namespaceName">
        /// The namespace name.
        /// </param>
        /// <param name="tableName">
        /// The table name.
        /// </param>
        /// <param name="action">
        /// The action.
        /// </param>
        /// <exception cref="InvalidOperationException">
        /// </exception>
        public void BeginScan(string namespaceName, string tableName, Action <IList <Cell> > action)
        {
            if (this.client == null)
            {
                throw new InvalidOperationException("Session has been closed");
            }

            DatabaseScanner.BeginScan(this.client, namespaceName, tableName, action);
        }
Exemplo n.º 2
0
        /// <summary>
        /// The find.
        /// </summary>
        /// <param name="namespaceName">
        /// The namespace name.
        /// </param>
        /// <param name="tableName">
        /// The table name.
        /// </param>
        /// <param name="key">
        /// The key.
        /// </param>
        /// <returns>
        /// </returns>
        /// <exception cref="InvalidOperationException">
        /// </exception>
        public Cell Find(string namespaceName, string tableName, Key key)
        {
            if (this.client == null)
            {
                throw new InvalidOperationException("Session has been closed");
            }

            return(DatabaseScanner.Find(this.client, namespaceName, tableName, key));
        }
Exemplo n.º 3
0
        /// <summary>
        /// The disconnect.
        /// </summary>
        public static void Disconnect()
        {
            DatabaseScanner.Cancel();

            lock (SyncRoot)
            {
                if (Instance != null)
                {
                    FireConnectionStateChanged(new NotifyConnectionStateChangedEventArgs(ConnectionState.Disconnecting));
                    Instance.Close();
                    Instance = null;
                    FireConnectionStateChanged(new NotifyConnectionStateChangedEventArgs(ConnectionState.Disconnected));
                }
            }
        }