public void Log(string message, RecordKind kindOfRecord) { OnLog?.Invoke(null, new LogEntry() { LogMessage = message, RecordKind = kindOfRecord }); }
public Article GetArticle(Article article, RecordKind kind = RecordKind.UPTODATE) { if (kind == RecordKind.UPTODATE) { article.VDepth = 0; } else if (kind == RecordKind.OLDEST) { // depth >= 0 SetMostOldVersion(article); } else if (kind == RecordKind.DEFINED) { // TODO code for defined case } var fetched = FetchArticle(article); if (fetched == null) { DbEx.Instance.Throw <NoArticleFoundException>(article); } Wrapper.React.SetTop3ReactionCounts(fetched); return(fetched); }
public Comment GetComment(Comment comment, RecordKind kind = RecordKind.UPTODATE) { if (kind == RecordKind.UPTODATE) { comment.RDepth = 0; } else if (kind == RecordKind.OLDEST) { // depth >= 0 SetMostOldVersion(comment); } else if (kind == RecordKind.DEFINED) { // TODO code for defined case } var fetched = FindByCondition(c => c.Id.Equals(comment.Id) && c.RDepth.Equals(comment.RDepth) ) .FirstOrDefault(); if (fetched == null) { DbEx.Instance.Throw <NoCommentFoundException>(comment); } Wrapper.React.SetTop3ReactionCounts(fetched); return(fetched); }
private EventRecord(string contractName, int version, byte[] payload, RecordKind kind) { ContractName = contractName; Version = version; Payload = payload; Kind = kind; }
public GetWalkSequenceRecordPages(string jobId, RecordKind kind) { ServicePath = $"{WalkSequenceClient.BASE_PATH}/v1/jobs/{jobId}/records/pages"; QueryStringParams = new Dictionary <string, string> { { "kind", kind.ToString() } }; }
public GetUsMoveUpdateRecordPages(string jobId, RecordKind kind) { ServicePath = $"services/us-move-update/v1/jobs/{jobId}/records/pages"; QueryStringParams = new Dictionary <string, string> { { "kind", kind.ToString() } }; }
public void IncrementInvalidCountForAssert(RecordKind recordKind) { #if DEBUG // DeletedVersion is not invalidated if (recordKind != RecordKind.DeletedVersion) { this.numInvalidKeysForAssert++; } #endif }
private string GetFormattedLogText(string message, RecordKind kindOfRecord) { string value = kindOfRecord switch { RecordKind.CommandReceived => "Received a command", RecordKind.Error => "Error", RecordKind.Status => "Status", _ => "Status" }; return($"{DateTime.Now.ToString()} : {value} : {message} {Environment.NewLine}"); } }
public void Log(string message, RecordKind kindOfRecord) { if (!_isLoggingEnabled) { return; } var fullLogFilePath = DefaultServerValues.LoggingPath + Path.DirectorySeparatorChar + loggingFile; lock (padLock) { using (StreamWriter sWriter = new StreamWriter(fullLogFilePath, true)) { sWriter.Write(GetFormattedLogText(message, kindOfRecord)); } } }
public new void Log(string message, RecordKind kindOfRecord) { base.Log(message, kindOfRecord); }
public TWriteSetItemContext(TWriteSetItemContext previous, TVersionedItem <TValue> latestValue) { this.LatestValue = latestValue; this.CreateSequenceNumber = previous.CreateSequenceNumber; this.FirstVersionKind = previous.FirstVersionKind; }
public TWriteSetItemContext(TVersionedItem <TValue> value) { this.LatestValue = value; this.CreateSequenceNumber = value.VersionSequenceNumber; this.FirstVersionKind = value.Kind; }