anchor.diff:  ## <a id="cq_api"></a>Typical Continuous Query Lifecycle
   
   1.  The client creates the CQ. This sets up everything for running the query and provides the client with a `CqQuery` object, but does not execute the CQ. At this point, the query is in a `STOPPED `state, ready to be closed or run.
  -2.  The client runs the CQ with an API call to one of the `CqQuery execute*` methods. This puts the query into a `RUNNING` state on the client and on the server.
  -1.  The CqListener fields events and takes action accordingly. Events are not result sets. If the action requires doing something with the data, the data must first be retrieved.
  +2.  The client initiates the CQ with an API call to one of the `CqQuery execute*` methods. This puts the query into a `RUNNING` state on the client and on the server.  The server remotely evaluates the query string, and optionally returns the results to the client.
  +1.  The CqListener waits for events. When it receives events, it takes action accordingly. Events are not result sets. If the action requires doing something with the data, the data must first be retrieved.
   3.  The CQ is closed by a client call to `CqQuery.close`. This de-allocates all resources in use for the CQ on the client and server. At this point, the cycle could begin again with the creation of a new `CqQuery` instance.
   
   ## <a id="ExecutingACQ"></a>Executing a Continuous Query from the Client
  
positive.code: limitations under the License.
  -->
  
  The C++ and .NET clients can run queries that continuously monitor events in the <%=vars.product_name%> cache server and notify
  the client when the query results have changed.
  For details on the server-side setup for continuous queries, 
  see [How Continuous Querying Works](/serverman/developing/continuous_querying/how_continuous_querying_works.html) in the *<%=vars.product_name%> User Guide*.
  
  ## <a id="cq_main_features" ></a>Continuous Query Basics
  
  Continuous querying provides the following features:
  
  -   **Standard <%=vars.product_name%> native client query syntax and semantics**. CQ queries are expressed in the same language used for other native client queries. See [Remote Queries](../remote-querying/remote-queries.html).
  
  - **Standard <%=vars.product_name%> events-based management of CQ events**. The event handling used
  to process CQ events is based on the standard <%=vars.product_name%> event handling framework. 
  
negative.code: 1. Create a query service:
  
      ```
      var queryService = pool.GetQueryService();
      ```
  
  1. Create a CQ Listener:
  
      ```
      var cqListener = new MyCqListener<string, Order>();
      ```
  
  1. Insert the CQ Listener into a CQ attributes object:
  
      ```
      var cqAttributesFactory = new CqAttributesFactory<string, Order>();
      cqAttributesFactory.AddCqListener(cqListener);
      var cqAttributes = cqAttributesFactory.Create();
      ```
  
  