public void Dispose() { if (_libHandle != IntPtr.Zero) { PlatformNativeLibInterop.CloseLibrary(_libHandle); } _libHandle = IntPtr.Zero; }
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"); }
TDelegate LoadFunction <TDelegate>(string symbol) { return(PlatformNativeLibInterop.GetDelegate <TDelegate>(_libHandle, symbol)); }