예제 #1
0
 protected virtual void MakeCallback(
     AsyncCallback callback, AsyncResultNoResult result)
 {
     // If a callback method was set, call it
     if (callback != null)
     {
         callback(result);
     }
 }
예제 #2
0
 internal void SubmitSchemaRefresh(string keyspace, string table, AsyncResultNoResult ar = null)
 {
     if (keyspace == null)
     {
         ResetSchema();
     }
     else if (table == null)
     {
         ResetKeyspace(keyspace);
     }
     else
     {
         ResetTable(keyspace, table);
     }
 }
예제 #3
0
        public new static TResult End(IAsyncResult result, object owner, string operationId)
        {
            var asyncResult = result as AsyncResult <TResult>;

            if (asyncResult == null)
            {
                throw new ArgumentException(
                          "Result passed represents an operation not supported " +
                          "by this framework.",
                          "result");
            }

            // Wait until operation has completed
            AsyncResultNoResult.End(result, owner, operationId);

            // Return the result (if above didn't throw)
            return(asyncResult._result);
        }