public Adapter(Object LibraryInstance, String MethodName)
            {
                Type libraryType = LibraryInstance.GetType();

                Type[]     methodParameters = typeof(LibraryDelegate <TRuntimeType>).GetMethod("Invoke").GetParameters().Select(p => p.ParameterType).ToArray();
                MethodInfo libMethod        = libraryType.GetMethod(MethodName, methodParameters);

                libDelegate = (LibraryDelegate <TRuntimeType>)Delegate.CreateDelegate(typeof(LibraryDelegate <TRuntimeType>), LibraryInstance, libMethod);
            }
Ejemplo n.º 2
0
 private LibraryFunction(string n, LibraryDelegate fun)
 {
     Name     = n;
     Function = fun;
 }
Ejemplo n.º 3
0
		private LibraryFunction(string n, LibraryDelegate fun)
		{
			Name = n;
			Function = fun;
		}
Ejemplo n.º 4
0
 private LibraryFunction(IronySymbol n, LibraryDelegate fun)
 {
     Name     = n;
     Function = fun;
 }