Activity.SetTag(String, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds or update the activity tag with the input key and value.
public:
System::Diagnostics::Activity ^ SetTag(System::String ^ key, System::Object ^ value);
public System.Diagnostics.Activity SetTag (string key, object? value);
member this.SetTag : string * obj -> System.Diagnostics.Activity
Public Function SetTag (key As String, value As Object) As Activity
Parameters
- key
- String
The tag key name.
- value
- Object
The tag value mapped to the input key.
Returns
this
for convenient chaining.
Remarks
- If the input value is
null
:- If the collection has any tag with the same key, then this tag will get removed from the collection.
- Otherwise, nothing will happen and the collection will not change.
- If the input value is not
null
:- If the collection has any tag with the same key, then the value mapped to this key will get updated with the new input value.
- Otherwise, the key and value will get added as a new tag to the collection.
Applies to
Berkolaborasi dengan kami di GitHub
Sumber untuk konten ini dapat ditemukan di GitHub, yang juga dapat Anda gunakan untuk membuat dan meninjau masalah dan menarik permintaan. Untuk informasi selengkapnya, lihat panduan kontributor kami.
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk