public static WapitiModel Load(string path) { using (var stream = File.OpenRead(path)) { return(Wapiti.Load(stream)); } }
private static void SetPathForNativeDllResolution() { if (IntPtr.Size != 8) { const string message = "Wapiti.NET only supports 64-bit processes!"; throw new ArgumentOutOfRangeException(message); } var assemblyPath = Wapiti.GetExecutingAssemblyPath(); Wapiti.SetPathForNativeDllResolution(assemblyPath, "native", "x64"); // Support for NCrunch Wapiti.SetPathForNativeDllResolution(assemblyPath, "..", "lib", "native", "x64"); // Support for LINQPad Wapiti.SetPathForNativeDllResolution(assemblyPath, "..", "..", "native", "x64"); }
public static WapitiModel Load(Stream stream) { var lines = new StreamReader(stream).ReadAllLines(); return(Wapiti.Load(lines)); }
static Wapiti() { Wapiti.SetPathForNativeDllResolution(); }