ResXResourceReaderGetMetadataEnumerator Method

Returns an IDictionaryEnumerator instance for the current ResXResourceReader object that enumerates the design-time properties (<metadata> elements) in the source XML resource file or stream.

Definition

Namespace: KGySoft.Resources
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public IDictionaryEnumerator GetMetadataEnumerator()

Return Value

IDictionaryEnumerator
An IDictionaryEnumerator for that can be used to iterate through the design-time properties (<metadata>; elements) from the current XML resource file or stream.

Remarks

If the SafeMode property is , the IDictionaryEnumerator.Value property of the returned enumerator is a ResXDataNode instance rather than the resource value. This makes possible to check the raw .resx content before deserialization if the .resx file is from an untrusted source. See also the example at ResXDataNode.

If AllowDuplicatedKeys property is , then this method returns a lazy enumerator for the first time meaning the .resx file is parsed only during the enumeration. When any of the enumerators are obtained for the second time, a cached enumerator is returned with the whole parsed .resx content. If duplicates are disabled, the lastly defined value will be returned of a redefined name.

See also the Remarks section of the ResXResourceReader class for examples.

See Also