Add API Analyzer Assembly (#906)
* Start on API analyzers * Finish GuildAccessAnalyzer * Update build script (will this do?) * Correct slashes * Extrapolate DerivesFromModuleBase() to an extension method * Quick refactoring * Add doc file
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Microsoft.DotNet.PlatformAbstractions;
|
||||
using Microsoft.Extensions.DependencyModel;
|
||||
|
||||
namespace System
|
||||
{
|
||||
/// <summary> Polyfill of the AppDomain class from full framework. </summary>
|
||||
internal class AppDomain
|
||||
{
|
||||
public static AppDomain CurrentDomain { get; private set; }
|
||||
|
||||
private AppDomain()
|
||||
{
|
||||
}
|
||||
|
||||
static AppDomain()
|
||||
{
|
||||
CurrentDomain = new AppDomain();
|
||||
}
|
||||
|
||||
public Assembly[] GetAssemblies()
|
||||
{
|
||||
var rid = RuntimeEnvironment.GetRuntimeIdentifier();
|
||||
var ass = DependencyContext.Default.GetRuntimeAssemblyNames(rid);
|
||||
|
||||
return ass.Select(xan => Assembly.Load(xan)).ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user