NETHost.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #include <Atomic/Core/Object.h>
  3. #include <Atomic/IO/FileSystem.h>
  4. namespace Atomic
  5. {
  6. class ATOMIC_API NETHost : public Object
  7. {
  8. OBJECT(NETHost);
  9. public:
  10. /// Construct.
  11. NETHost(Context* context);
  12. /// Destruct.
  13. virtual ~NETHost();
  14. // It is important all these paths use native folder delimiter when passed to CoreCLR
  15. static void SetCoreCLRFilesAbsPath(const String& path) { coreCLRFilesAbsPath_ = GetNativePath(AddTrailingSlash(path)); }
  16. // ; (semicolon) delimited list of paths to loads assemblies from
  17. static void SetCoreCLRAssemblyLoadPaths(const String& path) { coreCLRAssemblyLoadPaths_ = path; }
  18. // ; (semicolon) delimited list of paths to trusted platform assemblies
  19. static void SetCoreCLRTPAPaths(const String& path) { coreCLRTPAPaths_ = path; }
  20. static const String& GetCoreCLRAssemblyLoadPaths() { return coreCLRAssemblyLoadPaths_; }
  21. virtual bool Initialize() = 0;
  22. virtual bool CreateDelegate(const String& assemblyName, const String& qualifiedClassName, const String& methodName, void** funcOut) = 0;
  23. virtual void WaitForDebuggerConnect() = 0;
  24. virtual int ExecAssembly(const String& assemblyName, const Vector<String>& args) = 0;
  25. virtual void Shutdown() = 0;
  26. protected:
  27. static String coreCLRFilesAbsPath_;
  28. static String coreCLRAssemblyLoadPaths_;
  29. static String coreCLRTPAPaths_;
  30. };
  31. }