/// <summary> /// Process the request using the provided connection context /// </summary> /// <param name="context"></param> private void ProcessWithContext(IServerDataServiceContext context) { try { if (this.DatabaseName != null) { // Retrieve the operations with the specified database name this.WriteObject(context.GetDatabaseOperations(this.DatabaseName), true); } else if (this.Database != null) { // Retrieve the operations with the database name specified by the database object this.WriteObject(context.GetDatabaseOperations(this.Database.Name), true); } else if (this.OperationGuid != Guid.Empty) { // Retrieve the operation with the operation Guid this.WriteObject(context.GetDatabaseOperation(this.OperationGuid), true); } else { // No name specified, retrieve all database's operations in the server this.WriteObject(context.GetDatabasesOperations(), true); } } catch (Exception ex) { SqlDatabaseExceptionHandler.WriteErrorDetails( this, context.ClientRequestId, ex); } }
/// <summary> /// Process the request using the provided connection context /// </summary> /// <param name="context"></param> private void ProcessWithContext(IServerDataServiceContext context) { try { if (this.DatabaseName != null) { // Retrieve the operations with the specified database name this.WriteObject(context.GetDatabaseOperations(this.DatabaseName), true); } else if (this.Database != null) { // Retrieve the operations with the database name specified by the database object this.WriteObject(context.GetDatabaseOperations(this.Database.Name), true); } else if (this.OperationGuid != Guid.Empty) { // Retrieve the operation with the operation Guid this.WriteObject(context.GetDatabaseOperation(this.OperationGuid), true); } else { // No name specified, retrieve all database's operations in the server this.WriteObject(context.GetDatabasesOperations(), true); } } catch (Exception ex) { SqlDatabaseExceptionHandler.WriteErrorDetails( this, context.ClientRequestId, ex); } }