IPluginEnvironment.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using ExIni;
  6. namespace XUnity.AutoTranslator.Plugin.Core
  7. {
  8. /// <summary>
  9. /// Interface representing the environment in which
  10. /// the plugin runs.
  11. ///
  12. /// This interface is not meant to be used by a translator.
  13. /// </summary>
  14. public interface IPluginEnvironment
  15. {
  16. /// <summary>
  17. /// Gets the path the plugin is located at.
  18. /// </summary>
  19. string PluginPath { get; }
  20. /// <summary>
  21. /// Gets or sets the path representing the root of the translations.
  22. /// </summary>
  23. string TranslationPath { get; }
  24. /// <summary>
  25. /// Gets or sets the path representing the config directory.
  26. /// </summary>
  27. string ConfigPath { get; }
  28. /// <summary>
  29. /// Gets the preferences file.
  30. /// </summary>
  31. IniFile Preferences { get; }
  32. /// <summary>
  33. /// Saves the preferences file.
  34. /// </summary>
  35. void SaveConfig();
  36. /// <summary>
  37. /// Gets a bool indicating whether the plugin environment allows experimental hooks by default.
  38. /// </summary>
  39. bool AllowRuntimeHooksByDefault { get; }
  40. }
  41. }