ResXResourceManagerSafeMode Property

Gets or sets whether the ResXResourceManager works in safe mode. In safe mode the retrieved objects are not deserialized automatically.
Default value: .

Definition

Namespace: KGySoft.Resources
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public bool SafeMode { get; set; }

Property Value

Boolean

Implements

IExpandoResourceManagerSafeMode

Remarks

When SafeMode is , then GetObject and GetMetaObject methods return ResXDataNode instances instead of deserialized objects. You can retrieve the deserialized objects by calling the ResXDataNode.GetValue or ResXDataNode.GetValueSafe methods.

When SafeMode is , then GetString and GetMetaString methods will return a String also for non-string objects. For non-string values the raw XML string value will be returned.

When SafeMode is , then GetStream and GetMetaStream methods will return a MemoryStream for any object. For values, which are neither MemoryStream, nor byte[] instances these methods return a stream wrapper for the same string value that is returned by the GetString/GetMetaString methods.

See Also