Skip to content

Instantly share code, notes, and snippets.

@MikeCodesDotNET
Created May 11, 2020 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikeCodesDotNET/1ec561809dae7638635cab6efc78cb8d to your computer and use it in GitHub Desktop.
Save MikeCodesDotNET/1ec561809dae7638635cab6efc78cb8d to your computer and use it in GitHub Desktop.
private bool IsIllegalAssemblyName(string assemblyName)
{
return assemblyName switch
{
"System.Console" => true,
"System.Diagnostics.Debug" => true,
"System.IO" => true,
"System.IO.FileSystem" => true,
"System.IO.FileSystem.Primitives" => true,
"System.Reflection" => true,
"System.Reflection.Extensions" => true,
"System.Runtime" => true,
"System.Runtime.Extensions" => true,
"System.Runtime.InteropServices" => true,
"System.Diagnostics.Tracing" => true,
"System.Runtime.CompilerServices.Unsafe" => true,
"System.Memory" => true,
"System.Reflection.Emit.ILGeneration" => true,
"System.Diagnostics.Tools" => true,
"System.Reflection.Metadata" => true,
"System.IO.Compression" => true,
"System.IO.MemoryMappedFiles" => true,
"System.Diagnostics.FileVersionInfo" => true,
"Microsoft.Win32.Registry" => true,
"System.Security.AccessControl" => true,
_ => false,
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment