This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static HashSet<Type> NumericTypes = new HashSet<Type> | |
{ | |
typeof(decimal), typeof(byte), typeof(sbyte), typeof(double) | |
,typeof(short), typeof(ushort), typeof(Single), typeof(UInt16) | |
,typeof(Int16), typeof(Int32), typeof(UInt32),typeof(UInt64) | |
,typeof(Int64), typeof(float) | |
}; | |
public static bool IsNumeric(Type type) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<Type>? GetAssemblyTypes(string typeName, string assemblyName = "Shakely") | |
{ | |
List<Assembly> allAssemblies = new List<Assembly>(); | |
List<Type> allTypes = new List<Type>(); | |
string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); | |
for (int i = 0; i < Directory.GetFiles(path, $"{assemblyName}*.dll").ToArray().Length; i++) | |
{ | |
var dll = Assembly.LoadFile(Directory.GetFiles(path, $"{assemblyName}*.dll").ToArray()[i]); | |
allAssemblies.Add(dll); |
OlderNewer