Class EmbeddedResource
An IResource implementation for resources stored within assemblies.
Implements
Inherited Members
Namespace: Tangosol.IO.Resources
Assembly: Coherence.dll
Syntax
public class EmbeddedResource : AbstractResource, IResource
Remarks
This implementation expects any resource name passed to the constructor to adhere to the following format:
assembly://assemblyName/namespace/resourceName
Constructors
EmbeddedResource(string)
Creates a new instance of the EmbeddedResource class.
Declaration
public EmbeddedResource(string resourceName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | resourceName | The name of the assembly resource. |
Exceptions
| Type | Condition |
|---|---|
| UriFormatException | If the supplied |
| FileLoadException | If the assembly specified in the supplied
|
| FileNotFoundException | If the assembly specified in the supplied
|
| SecurityException | If the caller does not have the required permission to load
the assembly specified in the supplied
|
Methods
GetStream()
Opens a stream for this IResource.
Declaration
public override Stream GetStream()
Returns
| Type | Description |
|---|---|
| Stream | A System.IO.Stream. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| IOException | If the stream could not be opened. |
| SecurityException | If the caller does not have the required permission to load the underlying assembly's manifest. |