EnvAndLog.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace CLRSharp
  5. {
  6. public interface ICLRSharp_Logger
  7. {
  8. void Log(string str);
  9. void Log_Warning(string str);
  10. void Log_Error(string str);
  11. }
  12. public interface ICLRSharp_Environment
  13. {
  14. string version
  15. {
  16. get;
  17. }
  18. void LoadModule(System.IO.Stream dllStream);
  19. void LoadModule(System.IO.Stream dllStream, System.IO.Stream pdbStream, Mono.Cecil.Cil.ISymbolReaderProvider debugInfoLoader);
  20. ////仅仅加载模块的名字和他引用的模块名字
  21. //void LoadModule_OnlyName(System.IO.Stream dllStream);
  22. void AddSerachAssembly(System.Reflection.Assembly assembly);
  23. string[] GetAllTypes();
  24. ICLRType GetType(string name);
  25. string[] GetModuleRefNames();
  26. ICLRType GetType(System.Type systemType);
  27. void RegType(ICLRType type);
  28. ICLRSharp_Logger logger
  29. {
  30. get;
  31. }
  32. void RegCrossBind(ICrossBind bind);
  33. ICrossBind GetCrossBind(Type type);
  34. }
  35. public interface ICrossBind
  36. {
  37. Type Type
  38. { get; }
  39. object CreateBind(CLRSharp_Instance inst);
  40. }
  41. }