public SolcLibAdvDLProvider() { var config = ImplementationOptions.UseLazyBinding; NativeLibFilePath = LibPathResolver.Resolve(LIB_FILE); var builder = new NativeLibraryBuilder(config); _native = builder.ActivateInterface <IAdvDLSolcLib>(NativeLibFilePath); }
public ResolvePathResult Resolve(string library) { try { var path = LibPathResolver.Resolve(library); return(ResolvePathResult.FromSuccess(path)); } catch (Exception ex) { return(ResolvePathResult.FromError(ex)); } }
public SolcLibDynamicProvider() { NativeLibFilePath = LibPathResolver.Resolve(LIB_FILE); var libPathResolver = new CustomResolver(NativeLibFilePath); _native = new NativeLibrary(LIB_FILE, LibraryLoader.GetPlatformDefaultLoader(), libPathResolver); _compileStandard = LoadFunction <CompileStandardDelegate>("compileStandard"); _compileJson = LoadFunction <CompileJsonDelegate>("compileJSON"); _compileJsonMulti = LoadFunction <CompileJsonMultiDelegate>("compileJSONMulti"); _compileJsonCallback = LoadFunction <CompileJsonCallbackDelegate>("compileJSONCallback"); _license = LoadFunction <LicenseDelegate>("license"); _version = LoadFunction <VersionDelegate>("version"); }
public override IEnumerable <string> EnumeratePossibleLibraryLoadTargets(string name) { yield return(LibPathResolver.Resolve(name)); }