Record outgoing dating of an electronic digital dual

Record outgoing dating of an electronic digital dual

There is no restrict to your level of dating that you could enjoys anywhere between several twins-you can get as many relationship ranging from twins as you wish.

This fact ensures that you can show a number of style of matchmaking ranging from a few twins immediately. Including, Twin A may possess each other a held relationships and are made relationship that have Dual B.

It’s also possible to manage several instances of a similar sorts of dating amongst the same one or two twins, if you’d like. Within this analogy, Dual A have several more kept relationships that have Twin B, for as long as the brand new matchmaking has actually more dating IDs.

Brand new DTDL features of minMultiplicity and you will maxMultiplicity to possess relationships aren’t currently offered from inside the Azure Electronic Twins-although they are defined as element of a model, they will not feel implemented because of the provider. To find out more, get a hold of Blue Electronic Twins DTDL execution insights.

Number properties of 1 matchmaking

You can always deserialize relationship data to a type of your choice. For basic access to a relationship, use the type BasicRelationship . The BasicRelationship helper class also gives you access to properties defined on the relationship, through an IDictionary . To list properties, you can use:

To access the list of outbound dating to own certain twin on chart, you are able to the newest GetRelationships() means like this:

This method returns an Azure.Pageable or Azure.AsyncPageable , depending on whether you use the synchronous or asynchronous version of the call.

Just to illustrate that retrieves a listing of relationship. It uses the latest SDK telephone call (highlighted) inside a custom made method which may come in the newest framework out of a more impressive system.

You can utilize the fresh recovered relationship so you can navigate for other twins on your graph by the studying the target field from the dating that is came back, and making use of it this new ID for your upcoming telephone call so you’re able to GetDigitalTwin() .

Record incoming relationships to an electronic twin

Azure Electronic Twins likewise has an enthusiastic SDK name locate all incoming dating in order to confirmed dual. So it SDK is commonly useful for contrary routing, otherwise when removing a dual.

IncomingRelationship phone calls try not to return an entire system of the relationship. For more information on the new IncomingRelationship class, look for their source files.

The fresh new code shot in the previous part concerned about trying to find outbound dating away from a twin. Another analogy try organized similarly, but discovers inbound dating to the dual alternatively. This case and spends the brand new SDK phone call (highlighted) into the a customized strategy that might can be found in the brand new context from a larger system.

List all dual attributes and relationships

Utilising the above techniques for number outbound and inbound relationships to help you a twin, you can create a method one to prints complete twin suggestions, like the twin’s features and you may both particular the matchmaking. Here’s an example individualized means exhibiting ideas on how to mix these customized strategies for it goal.

Posting relationships

This technique is for updating the fresh attributes from a relationship. If you would like alter the origin twin or address twin of the relationships, you will need to remove the relationship and you may lso are-manage one to utilising the this new twins.

  • The newest ID of your own origin twin (the fresh new twin the spot where the matchmaking develop).
  • New ID of your link to inform.
  • A good JSON Spot file that has the fresh properties and the latest beliefs your should update.

Listed here is a sample password snippet appearing making use of this process. This example spends new SDK name (highlighted) to the a custom strategy that might come in the fresh new framework regarding a larger system.

Here’s an example out of a call compared to that customized strategy, passage in a beneficial JSON Patch file in doing what so you can update a property.

آخر التدوينات

المزيد من التدوينات

عربة التسوق

تسجيل الدخول

لا يوجد حساب بعد؟

Start typing to see products you are looking for.