mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Remove default implementation from interface
Not supported on netf
This commit is contained in:
@@ -106,6 +106,7 @@ internal sealed class Startup {
|
||||
if (PluginsCore.ActivePlugins?.Count > 0) {
|
||||
foreach (IWebInterface plugin in PluginsCore.ActivePlugins.OfType<IWebInterface>()) {
|
||||
if (string.IsNullOrEmpty(plugin.PhysicalPath) || string.IsNullOrEmpty(plugin.WebPath)) {
|
||||
// Invalid path provided
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -113,10 +114,18 @@ internal sealed class Startup {
|
||||
|
||||
if (!Path.IsPathRooted(physicalPath)) {
|
||||
// Relative path
|
||||
physicalPath = Path.Combine(Path.GetDirectoryName(plugin.GetType().Assembly.Location)!, plugin.PhysicalPath);
|
||||
string? assemblyDirectory = Path.GetDirectoryName(plugin.GetType().Assembly.Location);
|
||||
|
||||
if (string.IsNullOrEmpty(assemblyDirectory)) {
|
||||
// Invalid path provided
|
||||
continue;
|
||||
}
|
||||
|
||||
physicalPath = Path.Combine(assemblyDirectory, plugin.PhysicalPath);
|
||||
}
|
||||
|
||||
if (!Directory.Exists(physicalPath)) {
|
||||
// Non-existing path provided
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,13 +25,13 @@ namespace ArchiSteamFarm.Plugins.Interfaces;
|
||||
|
||||
public interface IWebInterface : IPlugin {
|
||||
/// <summary>
|
||||
/// Specifies physical path to static WWW files provided by the plugin. Can be either relative to plugin's assembly location, or absolute. Default "www" value assumes that you ship "www" directory together with your plugin's main DLL assembly, similar to ASF.
|
||||
/// Specifies physical path to static WWW files provided by the plugin. Can be either relative to plugin's assembly location, or absolute. If you don't know better, we recommend value of "www", which assumes that you ship "www" directory together with your plugin's main DLL assembly, similar to ASF.
|
||||
/// </summary>
|
||||
string PhysicalPath => "www";
|
||||
string PhysicalPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies web path (address) under which ASF should host your static WWW files in <see cref="PhysicalPath" /> directory. Default "/" value allows you to override default ASF files and gives you full flexibility in your www directory. However, you can instead host your files under some fixed location specified here, such as "/MyPlugin".
|
||||
/// Specifies web path (address) under which ASF should host your static WWW files in <see cref="PhysicalPath" /> directory. If you don't know better, we recommend value of "/", which allows you to override default ASF files and gives you full flexibility in your <see cref="PhysicalPath" /> directory. However, you can instead host your files under some other fixed location specified here, such as "/MyPlugin".
|
||||
/// </summary>
|
||||
[JsonProperty]
|
||||
string WebPath => "/";
|
||||
string WebPath { get; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user