Muslim.AssemblyHelper 1.0.0

There is a newer version of this package available.
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                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Muslim.AssemblyHelper" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Muslim.AssemblyHelper --version 1.0.0                
#r "nuget: Muslim.AssemblyHelper, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last updated
3.0.0 231 12/19/2023
2.4.0 155 7/29/2023
1.0.0 163 6/26/2023