C# Класс MvcContrib.PortableAreas.AssemblyResourceLocator

Lookup to find an embedded resource from an assembly. This class abstract the fact that embedded resource in C# project and those in VB project are not embedded the same way. VB compiler does not prefix embedded resource name with the path of the original file.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AssemblyResourceLocator ( string>.Dictionary resources, string namespaceName, string virtualPath ) : System
GetFullyQualifiedTypeFromPath ( string path ) : string

Returns the fully qualified path for an embedded resource from the virtual path recveived The path returned by this method is invalid if the virtual path point towards a VB PortableArea. Unless everything in this VB assembly is at the root.

IsPathResourceStream ( string path ) : bool

Returns true if a virtual path points towards an existing embedded resource. This method looks first for a standard embedded resource (C#) and second for an embedded resource with the same name, but anywhere in the subnamespace structure (VB).

TryGetActualResourceName ( string path, string &resourceName ) : bool

From the virtual path received, look for the associated embedded resource and returns if exists. This method supports both C# and VB embedded resource.

This method looks first for a standard embedded resource (C#) and second for an embedded resource with the same name, but anywhere in the subnamespace structure (VB).

Приватные методы

Метод Описание
GetFileNameOnly ( string fullPath ) : string
GetPartiallyQualifiedTypeFromPath ( string path, int rootLevel, bool &keepGoing ) : string
JoinNamespaces ( ) : Func
JoinNamespaces ( string x, string y ) : string
RemoveIntermediatePathFrom ( string fullPath, int rootLevel, bool &keepGoing ) : string
ResourcesContainsFullyQualifiedType ( string path ) : bool
ResourcesContainsPartiallyQualifiedType ( string path ) : bool
ResourcesContainsType ( string typeString ) : bool
TryGetPartialResourceName ( string path, string &resourceName ) : bool

Описание методов

AssemblyResourceLocator() публичный Метод

public AssemblyResourceLocator ( string>.Dictionary resources, string namespaceName, string virtualPath ) : System
resources string>.Dictionary
namespaceName string
virtualPath string
Результат System

GetFullyQualifiedTypeFromPath() публичный Метод

Returns the fully qualified path for an embedded resource from the virtual path recveived The path returned by this method is invalid if the virtual path point towards a VB PortableArea. Unless everything in this VB assembly is at the root.
public GetFullyQualifiedTypeFromPath ( string path ) : string
path string
Результат string

IsPathResourceStream() публичный Метод

Returns true if a virtual path points towards an existing embedded resource. This method looks first for a standard embedded resource (C#) and second for an embedded resource with the same name, but anywhere in the subnamespace structure (VB).
public IsPathResourceStream ( string path ) : bool
path string
Результат bool

TryGetActualResourceName() публичный Метод

From the virtual path received, look for the associated embedded resource and returns if exists. This method supports both C# and VB embedded resource.
This method looks first for a standard embedded resource (C#) and second for an embedded resource with the same name, but anywhere in the subnamespace structure (VB).
public TryGetActualResourceName ( string path, string &resourceName ) : bool
path string /// The virtual path of a resource ///
resourceName string /// Returns the real embedded resource name associated to the virtual resource path. ///
Результат bool