mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
21 lines
574 B
C#
21 lines
574 B
C#
using System;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
|
|
namespace Robust.Shared.ContentPack
|
|
{
|
|
public static class AppDomainExt
|
|
{
|
|
/// <summary>
|
|
/// Gets an assembly by name from the given AppDomain.
|
|
/// </summary>
|
|
/// <param name="domain"></param>
|
|
/// <param name="name"></param>
|
|
/// <returns></returns>
|
|
public static Assembly GetAssemblyByName(this AppDomain domain, string name)
|
|
{
|
|
return domain.GetAssemblies().Single(assembly => assembly.GetName().Name == name);
|
|
}
|
|
}
|
|
}
|