Class EmbeddedResourceUtility
- Namespace
- Utilty
- Assembly
- DougWare.OobaboogaAPIHelper.dll
An abstract base class that provides methods for deserializing an object from an embedded resource
- Inheritance
-
Embedded
Resource Utility
- Inherited Members
Methods
GetObjectFromResource<T>(string)
Deserializes an object of type T from an embedded resource with the given name.
Parameters
resourceName
stringThe name of the embedded resource containing the JSON data.
Returns
- T
An instance of type T deserialized from the embedded resource.
Type Parameters
T
The type of the object to deserialize.
Exceptions
- Invalid
Operation Exception Thrown when the resourceName is not found.
- Json
Exception Thrown when deserialization fails.
GetStringFromResource(string)
Reads a string embedded resource with the given name.
Parameters
resourceName
stringThe name of the embedded resource containing the JSON data.
Returns
- string
An string from the embedded resource.
Exceptions
- Invalid
Operation Exception Thrown when the resourceName is not found.