KGy SOFT

HybridResourceManagerSafeMode Property

KGy SOFT Core Libraries Help
Gets or sets whether the HybridResourceManager works in safe mode. In safe mode the retrieved objects returned from .resx sources are not deserialized automatically.
See the Remarks section for details.
Default value: .

Namespace:  KGySoft.Resources
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.4.0
Syntax

public bool SafeMode { get; set; }

Property Value

Type: Boolean

Implements

IExpandoResourceManagerSafeMode
Remarks

When SafeMode is , then GetObject and GetMetaObject methods return ResXDataNode instances instead of deserialized objects, if they are returned from .resx resource. You can retrieve the deserialized objects on demand by calling the ResXDataNode.GetValue method.

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 for resources from a .resx source and the result of the ToString method for resources from a compiled source.

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

Reference