mirror of
https://github.com/cadmium-im/zirconium-sharp.git
synced 2024-11-22 02:12:22 +00:00
Change name of argument in IPluginAPI.Initialize method
This commit is contained in:
parent
cb4145b7e7
commit
89fe7bf07a
@ -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();
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user