Description
Gets the object's metadata. Metadata is a collection of keys and their associated values.
Property type
Read-only property
Syntax
See Also
Example
Add Metadata To Object
[C#] |
---|
stkObject.Metadata.Set("key", "value");
|
|
Add ReadOnly Metadata To Object
[C#] |
---|
stkObject.Metadata.Set("key", "value");
stkObject.Metadata.SetReadOnly("key", true);
|
|
Remove Metadata From Object
[C#] |
---|
stkObject.Metadata.RemoveKey("key");
|
|
Iterate Metadata Keys
[C#] |
---|
foreach (string key in stkObject.Metadata.Keys)
{
Console.WriteLine("Key: {0}, Value: {1}", key, stkObject.Metadata[key]);
}
|
|
Check If Metadata Is ReadOnly
[C#] |
---|
if (stkObject.Metadata.GetReadOnly("test"))
{
Console.WriteLine("The test Metadata element is ReadOnly.");
}
|
|
Check If Metadata Contains Key
[C#] |
---|
if (stkObject.Metadata.Contains("test"))
{
Console.WriteLine("The collection contains the test element.");
}
|
|
Add Metadata To Object
[Visual Basic .NET] |
---|
stkObject.Metadata.[Set]("key", "value")
|
|
Add ReadOnly Metadata To Object
[Visual Basic .NET] |
---|
stkObject.Metadata.[Set]("key", "value")
stkObject.Metadata.SetReadOnly("key", True)
|
|
Remove Metadata From Object
[Visual Basic .NET] |
---|
stkObject.Metadata.RemoveKey("key")
|
|
Iterate Metadata Keys
[Visual Basic .NET] |
---|
For Each key As String In stkObject.Metadata.Keys
Console.WriteLine("Key: {0}, Value: {1}", key, stkObject.Metadata(key))
Next
|
|
Check If Metadata Is ReadOnly
[Visual Basic .NET] |
---|
If stkObject.Metadata.GetReadOnly("test") Then
Console.WriteLine("The test Metadata element is ReadOnly.")
End If
|
|
Check If Metadata Contains Key
[Visual Basic .NET] |
---|
If stkObject.Metadata.Contains("test") Then
Console.WriteLine("The collection contains the test element.")
End If
|
|