10 [CollectionName(BlockReferencesCollection)]
11 [NoBackup(
"Actual blocks are not included in a backup. By not including these records, blocks will be re-fetched after a restore.")]
15 [Index(
"FileName",
"Creator",
"AccessDenied",
"Unpacked")]
16 [Index(
"Creator",
"AccessDenied",
"Unpacked",
"Created")]
17 [Index(
"Creator",
"AccessDenied",
"Created")]
18 [Index(
"Collection",
"Creator",
"Created")]
19 [Index(
"Collection",
"Created")]
28 private string objectId =
null;
29 private string fileName =
string.Empty;
30 private byte[] digest =
null;
31 private byte[] signature =
null;
32 private string[] sources =
null;
33 private ulong bytes = 0;
34 private bool accessDenied =
false;
35 private bool unpacked =
false;
54 this.Creator = Header.Creator;
55 this.Collection = Header.Collection;
56 this.Created = Header.Created;
57 this.Updated = Header.Updated;
58 this.Expires = Header.Expires;
59 this.Status = Header.Status;
60 this.Link = Header.Link;
75 set => this.objectId = value;
84 set => this.fileName = value;
93 set => this.digest = value;
101 get => this.signature;
102 set => this.signature = value;
112 set => this.sources = value;
122 set => this.bytes = value;
130 get => this.accessDenied;
131 set => this.accessDenied = value;
139 get => this.unpacked;
140 set => this.unpacked = value;
148 StringBuilder sb =
new StringBuilder();
150 sb.Append(
"Filename: ");
151 sb.Append(this.fileName ??
string.Empty);
152 sb.Append(
", Digest: ");
153 sb.Append(Convert.ToBase64String(
this.digest ?? Array.Empty<
byte>()));
155 return sb.ToString();
Contains a reference to a block in the ledger.
ulong Bytes
Size of block, in bytes.
bool AccessDenied
If access to the block was denied.
BlockReference()
Contains a reference to a block in the ledger.
bool Unpacked
If objects in the block have been unpacked.
string[] Sources
Sources of block
const string BlockReferencesCollection
Collection housing all block references.
override string ToString()
object.ToString()
byte[] Digest
Digest of block
byte[] Signature
Signature of block
string FileName
Local filename of block
BlockReference(BlockHeader Header, string FileName, byte[] Digest, byte[] Signature, ulong Bytes)
Contains a reference to a block in the ledger.
TypeNameSerialization
How the type name should be serialized.