Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ObjectReference.cs
1using System;
2using System.Collections.Generic;
4
6{
10 [CollectionName("FullTextSearchObjects")]
11 [TypeName(TypeNameSerialization.None)]
12 [Index("IndexCollection", "Index")]
13 [Index("Collection", "ObjectInstanceId")]
14 public class ObjectReference
15 {
20 {
21 }
22
26 [ObjectId]
27 public string ObjectId { get; set; }
28
32 public string IndexCollection { get; set; }
33
37 public string Collection { get; set; }
38
42 public object ObjectInstanceId { get; set; }
43
47 public ulong Index { get; set; }
48
52 public TokenCount[] Tokens { get; set; }
53
57 public DateTime Indexed { get; set; }
58
65 public bool TryGetCount(string Token, out TokenCount Count)
66 {
67 if (this.tokensByName is null)
68 {
69 this.tokensByName = new Dictionary<string, TokenCount>(StringComparer.InvariantCultureIgnoreCase);
70
71 foreach (TokenCount TokenCount in this.Tokens)
72 this.tokensByName[TokenCount.Token] = TokenCount;
73 }
74
75 return this.tokensByName.TryGetValue(Token, out Count);
76 }
77
78 private Dictionary<string, TokenCount> tokensByName = null;
79 }
80}
Contains a reference to an indexed object.
object ObjectInstanceId
Object ID of object instance.
TokenCount[] Tokens
Token count in document.
string Collection
Name of collection hosting object.
DateTime Indexed
When object was indexed.
string ObjectId
Object ID of reference object.
ObjectReference()
Contains a reference to an indexed object.
bool TryGetCount(string Token, out TokenCount Count)
Tries to get a specific token count.
string IndexCollection
Collection of full-text-search index.
ulong Index
Reference number to use in full-text-index.
Represents a token and a corresponding occurrence count.
Definition: TokenCount.cs:12
TypeNameSerialization
How the type name should be serialized.