Muslim.AssemblyHelper
1.0.0
See the version list below for details.
dotnet add package Muslim.AssemblyHelper --version 1.0.0
NuGet\Install-Package Muslim.AssemblyHelper -Version 1.0.0
<PackageReference Include="Muslim.AssemblyHelper" Version="1.0.0" />
paket add Muslim.AssemblyHelper --version 1.0.0
#r "nuget: Muslim.AssemblyHelper, 1.0.0"
// Install Muslim.AssemblyHelper as a Cake Addin #addin nuget:?package=Muslim.AssemblyHelper&version=1.0.0 // Install Muslim.AssemblyHelper as a Cake Tool #tool nuget:?package=Muslim.AssemblyHelper&version=1.0.0
Assembly Helper Utility
The Assembly Helper Utility is a .NET utility class that provides convenient methods for working with assemblies. It simplifies tasks such as retrieving assembly information, finding solution files, and getting types from assemblies.
Features
GetAssembly(Type type)
: Retrieves the assembly that contains the specified type.GetAssembly(string assemblyName)
: Loads the assembly with the given name.GetAllAssembly()
: Returns a list of all assemblies in the solution.GetAssemblyName()
: Retrieves the names of all assemblies in the solution.GetAssemblyName(Type type)
: Gets the name of the assembly that contains the specified type.GetAssemblyNameLength(string assemblyName)
: Returns the length of the assembly name (number of segments separated by dots).GetAssemblyNameLength(Type assemblyType)
: Gets the length of the assembly name that contains the specified type.GeTypeByName(Assembly assembly, string typeName)
: Retrieves types from the specified assembly that contain the given type name.GeTypeByName(string typeName)
: Returns types from all assemblies in the solution that contain the given type name.GetTypes()
: Retrieves all types from all assemblies in the solution.GetType(string typeName)
: Gets the specified type from the assemblies in the solution.GetConstructors()
: Returns a list of constructor parameter types from the types in the assemblies.
Usage
To use the Assembly Helper Utility in your .NET project, make sure to include the following namespaces at the beginning of your code file:
using Microsoft.Build.Construction;
using System.Reflection;
Example:
using AssemblyServices;
using Microsoft.Build.Construction;
using System.Reflection;
// Retrieve the assembly containing a specific type
Assembly assembly = AssemblyServices.GetAssembly(typeof(MyType));
// Retrieve all assembly names in the solution
List<string> assemblyNames = AssemblyServices.GetAssemblyName();
// Get types from all assemblies containing a specific type name
IEnumerable<Type> types = AssemblyServices.GeTypeByName("MyType");
// Retrieve all types in the solution
IEnumerable<Type> allTypes = AssemblyServices.GetTypes();
// ...and more
Contributing
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please feel free to open an issue or submit a pull request.
License
This utility class is licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.Build (>= 17.6.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Muslim.AssemblyHelper:
Package | Downloads |
---|---|
Muslim.ConfigureTable
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.