예제 #1
0
 public static T1 Load <T1, T2>(T2 baseApi, SearchPathContainer paths = null)
     where T1 : NativeExtension <T2> where T2 : NativeAPI
 {
     CreateBuilder <T2>();
     return(baseApi.IsExtensionPresent(GetExtensionAttribute(typeof(T1)).Name)
         ? _builders[typeof(T2)].ActivateClass <T1>((paths ?? baseApi.SearchPaths).GetLibraryName())
         : null);
 }
예제 #2
0
        public static T1 Load <T1, T2>(T2 baseApi, SearchPathContainer paths, ISymbolLoader loader)
            where T1 : NativeExtension <T2> where T2 : NativeAPI
        {
            var builder = new NativeLibraryBuilder(Options).WithSymbolLoader(x => loader ?? x);
            var extAttr = GetExtensionAttribute(typeof(T1));

            return(baseApi.IsExtensionPresent(extAttr.Name)
                ? builder.ActivateClass <T1>((paths ?? baseApi.SearchPaths).GetLibraryName())
                : null);
        }
예제 #3
0
 public static TExt Load <TExt>(T baseApi, SearchPathContainer paths)
     where TExt : NativeExtension <T>
 {
     return(LibraryLoader.Load <TExt, T>(baseApi, paths));
 }
예제 #4
0
 public static T Load(SearchPathContainer paths)
 {
     return(LibraryLoader.Load <T>(paths));
 }
예제 #5
0
 public static T Load(SearchPathContainer paths, Ultz.SuperInvoke.Loader.LibraryLoader loader)
 {
     return(LibraryLoader.Load <T>(paths, loader));
 }
예제 #6
0
        public static T1 Load <T1>(SearchPathContainer nameContainer, ISymbolLoader loader) where T1 : NativeAPI
        {
            var builder = new NativeLibraryBuilder(Options).WithSymbolLoader(x => loader ?? x);

            return(builder.ActivateClass <T1>(nameContainer.GetLibraryName()));
        }
예제 #7
0
 public static T1 Load <T1>(SearchPathContainer nameContainer) where T1 : NativeAPI
 {
     CreateBuilder <T1>();
     return(_builders[typeof(T1)].ActivateClass <T1>(nameContainer.GetLibraryName()));
 }
예제 #8
0
 public static T1 Load <T1>
     (SearchPathContainer nameContainer, Ultz.SuperInvoke.Loader.LibraryLoader loader) where T1 : NativeAPI =>
 LibraryActivator.CreateInstance <T1>(nameContainer.GetLibraryName(), loader);
예제 #9
0
 public static T1 Load <T1>
     (SearchPathContainer nameContainer) where T1 : NativeAPI => LibraryActivator.CreateInstance <T1>
     (nameContainer.GetLibraryName());
예제 #10
0
 public static T Load(SearchPathContainer paths, ISymbolLoader loader)
 {
     return(LibraryLoader.Load <T>(paths, loader));
 }