Esempio n. 1
0
 public static WapitiModel Load(string path)
 {
     using (var stream = File.OpenRead(path))
     {
         return(Wapiti.Load(stream));
     }
 }
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
        public static WapitiModel Load(Stream stream)
        {
            var lines = new StreamReader(stream).ReadAllLines();

            return(Wapiti.Load(lines));
        }
Esempio n. 4
0
 static Wapiti()
 {
     Wapiti.SetPathForNativeDllResolution();
 }