C# Class Open.Core.Common.ReflectionExtensions

Exibir arquivo Open project: philcockfield/Open.TestHarness.SL

Public Methods

Method Description
GetAssemblies ( this currentDeployment ) : IEnumerable

Retrieves the current list of assemblies for the application XAP. Depends on the 'Deployment.Current' property being setup and so can only be accessed after the Application object has be completely constructed.

Derived from the MEF source (Preview 9).

GetEnumValues ( this enumType ) : object[]

Retrieves the collection of Enum values for the specified enum type.

This is necessary because the .NET 'GetValues' method for Enum was omitted from Silverlight.

GetResourceDictionary ( this assembly, string path ) : System.Windows.ResourceDictionary

Gets the specified resource-dictionary from within the assembly.

Make sure the XAML file's build-action is set to 'Page'.

Version ( this assembly ) : System.Version

Retrieves the version of the assembly.

Method Details

GetAssemblies() public static method

Retrieves the current list of assemblies for the application XAP. Depends on the 'Deployment.Current' property being setup and so can only be accessed after the Application object has be completely constructed.
Derived from the MEF source (Preview 9).
public static GetAssemblies ( this currentDeployment ) : IEnumerable
currentDeployment this The current deployment. Use 'Deployment.Current'.
return IEnumerable

GetEnumValues() public static method

Retrieves the collection of Enum values for the specified enum type.
This is necessary because the .NET 'GetValues' method for Enum was omitted from Silverlight.
public static GetEnumValues ( this enumType ) : object[]
enumType this The type of enum to retrieve values for.
return object[]

GetResourceDictionary() public static method

Gets the specified resource-dictionary from within the assembly.
Make sure the XAML file's build-action is set to 'Page'.
public static GetResourceDictionary ( this assembly, string path ) : System.Windows.ResourceDictionary
assembly this The assembly to look within.
path string The absolute path to the XAML file from the root of the assembly.
return System.Windows.ResourceDictionary

Version() public static method

Retrieves the version of the assembly.
public static Version ( this assembly ) : System.Version
assembly this The assembly to examine.
return System.Version