Show / Hide Table of Contents

Class EmbeddedResource

An IResource implementation for resources stored within assemblies.

Inheritance
object
AbstractResource
EmbeddedResource
Implements
IResource
Inherited Members
AbstractResource.Uri
AbstractResource.AbsolutePath
AbstractResource.GetResourceNameWithoutProtocol(string)
AbstractResource.ToString()
AbstractResource.Equals(object)
AbstractResource.GetHashCode()
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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 resourceName did not conform to the expected format.

FileLoadException

If the assembly specified in the supplied resourceName was loaded twice with two different evidences.

FileNotFoundException

If the assembly specified in the supplied resourceName could not be found.

SecurityException

If the caller does not have the required permission to load the assembly specified in the supplied resourceName.

Methods

GetStream()

Opens a stream for this IResource.

Declaration
public override Stream GetStream()
Returns
Type Description
Stream

A System.IO.Stream.

Overrides
AbstractResource.GetStream()
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.

Implements

IResource
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.