public Response(Request request, Status_Code Status, string[] AdditionalHeader = null, string AdditionalPayload = null) { req = request; status = Status; additionalHeader = AdditionalHeader; additionalPayload = AdditionalPayload; }
public override void Close() { try { if (_transaction.Open) { _transaction.close(); } } catch (TransientFailureException e) { // We let transient exceptions pass through unchanged since they aren't really transaction failures // in the same sense as unexpected failures are. Such exception signals that the transaction // can be retried and might be successful the next time. throw e; } catch (ConstraintViolationTransactionFailureException e) { throw new ConstraintViolationException(e.Message, e); } catch (Exception e) when(e is KernelException || e is TransactionTerminatedException) { Status_Code statusCode = e.status().code(); if (statusCode.Classification() == Status_Classification.TransientError) { throw new TransientTransactionFailureException(CloseFailureMessage() + ": " + statusCode.Description(), e); } throw new TransactionFailureException(CloseFailureMessage(), e); } catch (Exception e) { throw new TransactionFailureException(CloseFailureMessage(), e); } }
public SearchResult(List <Intel> intels, DateTime timestamp, int num_results, string title, Status_Code status, string message) { this.intels = intels; if (timestamp == null) { this.timestamp = DateTime.Now; } else { this.timestamp = timestamp; } this.num_results = num_results; this.title = title; this.Status = status; this.Message = message; }
public SearchResult(TreeNode treeNode, DateTime timestamp, int num_results, string title, Status_Code status, string message) { this.treeNode = treeNode; if (timestamp == null) { this.timestamp = DateTime.Now; } else { this.timestamp = timestamp; } this.num_results = num_results; this.title = title; this.Status = status; this.Message = message; }
public SearchResult(Status_Code status, string message) { this.Status = status; this.Message = message; this.timestamp = DateTime.Now; }