9 [CollectionName(
"ThingReferences")]
11 [Index(
"NodeId",
"SourceId",
"Partition")]
16 private string objectId =
null;
17 private string nodeId;
18 private string sourceId;
19 private string partition;
67 this.nodeId = Reference.
NodeId;
79 set => this.objectId = value;
89 set => this.nodeId = value;
99 set => this.sourceId = value;
108 get => this.partition;
109 set => this.partition = value;
117 get {
return string.IsNullOrEmpty(this.nodeId) &&
string.IsNullOrEmpty(this.sourceId) &&
string.IsNullOrEmpty(this.partition); }
127 StringBuilder sb =
new StringBuilder();
129 if (!
string.IsNullOrEmpty(this.nodeId))
131 sb.Append(this.nodeId);
133 if (!
string.IsNullOrEmpty(this.sourceId))
136 sb.Append(this.sourceId);
138 if (!
string.IsNullOrEmpty(this.partition))
141 sb.Append(this.partition);
146 return sb.ToString();
157 return this.nodeId == Ref.NodeId && this.sourceId == Ref.SourceId && this.partition == Ref.
Partition;
179 return this.nodeId.GetHashCode() ^
180 this.sourceId.GetHashCode() ^
181 this.partition.GetHashCode();
192 StringBuilder Output =
new StringBuilder();
194 if (!
string.IsNullOrEmpty(this.objectId))
196 Output.Append(this.objectId);
200 Output.Append(this.nodeId);
202 if (!
string.IsNullOrEmpty(this.sourceId))
205 Output.Append(this.sourceId);
207 if (!
string.IsNullOrEmpty(this.partition))
210 Output.Append(this.partition);
214 return Output.ToString();
Contains a reference to a thing
ThingReference()
Contains a reference to a thing
static ThingReference Empty
Empty thing reference. Can be used by sensors that are not part of a concentrator during readout.
bool SameThing(IThingReference Ref)
Checks if the thing reference is equal to other thing reference.
ThingReference(string NodeId, string SourceId, string Partition)
Contains a reference to a thing
string Partition
Optional partition in which the Node ID is unique.
bool IsEmpty
If the reference is an empty reference.
ThingReference(IThingReference Reference)
Contains a reference to a thing
override string ToString()
ThingReference(string NodeId)
Contains a reference to a thing
string ObjectId
Persisted object ID. Is null if object not persisted.
override int GetHashCode()
Serves as the default hash function.
override bool Equals(object obj)
Determines whether the specified object is equal to the current object.
ThingReference(string NodeId, string SourceId)
Contains a reference to a thing
string SourceId
Optional ID of source containing node.
string Key
Key for thing reference: [NodeId[, SourceId[, Partition]]]
Interface for thing references.
string Partition
Optional partition in which the Node ID is unique.
string SourceId
Optional ID of source containing node.