Fix a few calls to the wrong GetComponent

This commit is contained in:
Cyberboss
2017-12-08 11:28:07 -05:00
parent 5d21df71fd
commit 4e1dbbb215
2 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ namespace TGS.Interface.Wrappers
ITGInstanceManager InstanceManager { get; }
/// <summary>
/// Gets the specified <see cref="IInstance"/>
/// Gets the specified <see cref="IInstance"/> without connectivity checks
/// </summary>
/// <param name="name">The name of the <see cref="IInstance"/> to get</param>
/// <returns>The <see cref="IInstance"/> named <paramref name="name"/> on success, <see langword="null"/> on failure</returns>
+8 -8
View File
@@ -15,14 +15,14 @@ namespace TGS.Interface.Wrappers
{
lock (this)
if(knownInstances == null)
knownInstances = serverInterface.GetComponent<ITGLanding>().ListInstances();
knownInstances = serverInterface.GetComponent<ITGLanding>(null).ListInstances();
foreach(var I in knownInstances)
yield return new Instance(serverInterface, I);
}
}
/// <inheritdoc />
public ITGInstanceManager InstanceManager => serverInterface.GetComponent<ITGInstanceManager>();
public ITGInstanceManager InstanceManager => serverInterface.GetComponent<ITGInstanceManager>(null);
/// <summary>
/// The backing <see cref="ServerInterface"/>
@@ -52,37 +52,37 @@ namespace TGS.Interface.Wrappers
/// <inheritdoc />
public void PrepareForUpdate()
{
serverInterface.GetComponent<ITGSService>().PrepareForUpdate();
serverInterface.GetComponent<ITGSService>(null).PrepareForUpdate();
}
/// <inheritdoc />
public string PythonPath()
{
return serverInterface.GetComponent<ITGSService>().PythonPath();
return serverInterface.GetComponent<ITGSService>(null).PythonPath();
}
/// <inheritdoc />
public ushort RemoteAccessPort()
{
return serverInterface.GetComponent<ITGSService>().RemoteAccessPort();
return serverInterface.GetComponent<ITGSService>(null).RemoteAccessPort();
}
/// <inheritdoc />
public bool SetPythonPath(string path)
{
return serverInterface.GetComponent<ITGSService>().SetPythonPath(path);
return serverInterface.GetComponent<ITGSService>(null).SetPythonPath(path);
}
/// <inheritdoc />
public string SetRemoteAccessPort(ushort port)
{
return serverInterface.GetComponent<ITGSService>().SetRemoteAccessPort(port);
return serverInterface.GetComponent<ITGSService>(null).SetRemoteAccessPort(port);
}
/// <inheritdoc />
string ITGSService.Version()
{
return serverInterface.GetComponent<ITGSService>().Version();
return serverInterface.GetComponent<ITGSService>(null).Version();
}
}
}