Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
FlagSource.cs
1using System;
2
3namespace Waher.Persistence
4{
8 public class FlagSource
9 {
10 private readonly string reason;
11 private readonly string stackTrace;
12 private int count;
13
20 public FlagSource(string Reason, string StackTrace, int Count)
21 {
22 this.reason = Reason;
23 this.stackTrace = StackTrace;
24 this.count = Count;
25 }
26
30 public string Reason => this.reason;
31
35 public string StackTrace => this.stackTrace;
36
40 public int Count
41 {
42 get => this.count;
43 internal set => this.count = value;
44 }
45
47 public override int GetHashCode()
48 {
49 int Result = this.reason.GetHashCode();
50 Result ^= Result << 5 ^ this.stackTrace.GetHashCode();
51 Result ^= Result << 5 ^ this.count.GetHashCode();
52 return Result;
53 }
54
56 public override bool Equals(object obj)
57 {
58 return (obj is FlagSource S &&
59 this.reason == S.reason &&
60 this.stackTrace == S.stackTrace &&
61 this.count == S.count);
62 }
63 }
64}
Source of code flagging a collection for repair.
Definition: FlagSource.cs:9
int Count
Number of times the collection has been flagged from this source.
Definition: FlagSource.cs:41
override bool Equals(object obj)
Definition: FlagSource.cs:56
string StackTrace
Stack trace of source flagging the collection.
Definition: FlagSource.cs:35
override int GetHashCode()
Definition: FlagSource.cs:47
FlagSource(string Reason, string StackTrace, int Count)
Source of code flagging a collection for repair.
Definition: FlagSource.cs:20
string Reason
Reason for flagging collection.
Definition: FlagSource.cs:30