Class TwinIdentityProvider
Provides access to the objects by their identities.
Inherited Members
Namespace: AXSharp.Connector.Identity
Assembly: AXSharp.Connector.dll
Syntax
public class TwinIdentityProvider
Constructors
| Edit this page View SourceTwinIdentityProvider()
Creates new instance of TwinIdentityProvider.
Declaration
[Obsolete("Use `TwinIdentityProvider(Connector connector)` instead.")]
public TwinIdentityProvider()
TwinIdentityProvider(Connector)
Creates an instance of TwinIdentityProvider
Declaration
public TwinIdentityProvider(Connector connector)
Parameters
Type | Name | Description |
---|---|---|
Connector | connector |
Properties
| Edit this page View SourceIdentities
Get dictionary of identities.
Declaration
public SortedDictionary<ulong, ITwinIdentity> Identities { get; }
Property Value
Type | Description |
---|---|
SortedDictionary<ulong, ITwinIdentity> |
IdentitiesCount
Get count of identities.
Declaration
public long IdentitiesCount { get; }
Property Value
Type | Description |
---|---|
long |
Methods
| Edit this page View SourceAddIdentity(ITwinIdentity)
Adds twin object to the list of identities.
Declaration
public void AddIdentity(ITwinIdentity twinObject)
Parameters
Type | Name | Description |
---|---|---|
ITwinIdentity | twinObject | twin object |
ConstructIdentitiesAsync()
Refreshes and sorts identities.
Declaration
public Task ConstructIdentitiesAsync()
Returns
Type | Description |
---|---|
Task |
GetTwinByIdentity(ITwinIdentity)
Gets twin object by identity.
Declaration
public dynamic GetTwinByIdentity(ITwinIdentity obj)
Parameters
Type | Name | Description |
---|---|---|
ITwinIdentity | obj | Twin object. |
Returns
Type | Description |
---|---|
dynamic | Twin object with given identity. |
GetTwinByIdentity(object)
Gets twin object by identity, if the object implements ITwinIdentity. If object does not implements ITwinIdentity the same object is returned.
Declaration
public dynamic GetTwinByIdentity(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | Object with identity |
Returns
Type | Description |
---|---|
dynamic | twin object with given identity. |
GetTwinByIdentity(ulong)
Gets twin object by identity.
Declaration
public ITwinIdentity GetTwinByIdentity(ulong identity)
Parameters
Type | Name | Description |
---|---|---|
ulong | identity | Twin identity address. |
Returns
Type | Description |
---|---|
ITwinIdentity | Twin object with given identity. |