Change name of argument in IPluginAPI.Initialize method

This commit is contained in:
ChronosX88 2020-10-31 13:35:49 +04:00
parent cb4145b7e7
commit 89fe7bf07a
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A
5 changed files with 11 additions and 11 deletions

View File

@ -4,7 +4,7 @@ namespace Zirconium.Core.Plugins.Interfaces
{
public interface IPluginAPI
{
void Initialize(IPluginHostAPI hostModuleAPI);
void Initialize(IPluginHostAPI pluginHost);
void PreInitialize(IPluginManager pluginManager) {}
string GetPluginUniqueName();
}

View File

@ -12,9 +12,9 @@ namespace BasicChat
{
public string GetPluginUniqueName() => "BasicChat";
public void Initialize(IPluginHostAPI pluginHostAPI)
public void Initialize(IPluginHostAPI pluginHost)
{
pluginHostAPI.Hook(new ChatMessageRouterC2SHandler(pluginHostAPI));
pluginHost.Hook(new ChatMessageRouterC2SHandler(pluginHost));
}
}

View File

@ -19,11 +19,11 @@ namespace DefaultAuthProvider
return "DefaultAuthProvider";
}
public void Initialize(IPluginHostAPI hostModuleAPI)
public void Initialize(IPluginHostAPI pluginHost)
{
var db = hostModuleAPI.GetRawDatabase();
var jwtSecret = hostModuleAPI.GetSettings(this)["JWTSecret"];
hostModuleAPI.ProvideAuth(new DefaultAuthProvider(db, jwtSecret));
var db = pluginHost.GetRawDatabase();
var jwtSecret = pluginHost.GetSettings(this)["JWTSecret"];
pluginHost.ProvideAuth(new DefaultAuthProvider(db, jwtSecret));
}
}

View File

@ -58,9 +58,9 @@ namespace InBandLogin
return "InBandLogin";
}
public void Initialize(IPluginHostAPI hostModuleAPI)
public void Initialize(IPluginHostAPI pluginHost)
{
this.pluginHostAPI = hostModuleAPI;
this.pluginHostAPI = pluginHost;
pluginHostAPI.Hook(new LoginC2SHandler(pluginHostAPI));
pluginHostAPI.Hook(new RegisterC2SHandler(pluginHostAPI));
}

View File

@ -16,11 +16,11 @@ namespace TestMongoDB
return "TestMongoDB";
}
public void Initialize(IPluginHostAPI pluginHostAPI)
public void Initialize(IPluginHostAPI pluginHost)
{
var tm = new TestModel();
tm.ABC = "qweqowie";
var db = pluginHostAPI.GetRawDatabase();
var db = pluginHost.GetRawDatabase();
db.GetCollection<TestModel>("test_model").InsertOne(tm);
Log.Debug("successfully inserted the model");