Overview
An open source, .NET Standard 2.0 library that provides helpers for using reflection.
Below are the main features of the library. See the linked code for details.
Please contact me if you have any questions.
Getting Started
NuGet Package Installation
To install the ChannelAdam.Reflection NuGet package run the following command in the Package Manager Console:
1PM> Install-Package ChannelAdam.Reflection
Usage
1
2var myString = EmbeddedResource.GetAsString(assembly, "My.Namespace.Folder.EmbeddedResource.txt");
3
Reference
Easily retreive embedded resources from their manifest resource stream.
- Embedded Resource helper
public static Stream GetAsStream(Assembly assembly, string resourceName)
public static string GetAsString(Assembly assembly, string resourceName)
public static XElement GetXmlResourceAsXElement(Assembly assembly, string resourceName)
public static T DeserialiseFromXmlResource<T>(Assembly assembly, string xmlResourceName)
public static T DeserialiseFromXmlResource<T>(Assembly assembly, string xmlResourceName, XmlRootAttribute xmlRootAttribute)
public static T DeserialiseFromXmlResource<T>(Assembly assembly, string xmlResourceName, XmlAttributeOverrides xmlAttributeOverrides)
comments powered by Disqus