예제 #1
0
 public void Dispose()
 {
     if (_libHandle != IntPtr.Zero)
     {
         PlatformNativeLibInterop.CloseLibrary(_libHandle);
     }
     _libHandle = IntPtr.Zero;
 }
예제 #2
0
        public SolcLibDefaultProvider(string libPath)
        {
            LibPath    = libPath;
            _libHandle = PlatformNativeLibInterop.LoadLib(LibPath);

            _compileStandard     = LazyLoad <CompileStandardDelegate>("compileStandard");
            _compileJson         = LazyLoad <CompileJsonDelegate>("compileJSON");
            _compileJsonMulti    = LazyLoad <CompileJsonMultiDelegate>("compileJSONMulti");
            _compileJsonCallback = LazyLoad <CompileJsonCallbackDelegate>("compileJSONCallback");
            _license             = LazyLoad <LicenseDelegate>("license");
            _version             = LazyLoad <VersionDelegate>("version");
        }
예제 #3
0
 TDelegate LoadFunction <TDelegate>(string symbol)
 {
     return(PlatformNativeLibInterop.GetDelegate <TDelegate>(_libHandle, symbol));
 }