Fixed: Some Warnings

This commit is contained in:
TheJoKlLa 2021-02-24 20:59:43 +01:00
parent 65ea3ef6e9
commit acd3a837a9
6 changed files with 14 additions and 18 deletions

View File

@ -1,4 +1,5 @@
using System.Reflection; using System.Resources;
using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
@ -25,4 +26,5 @@ using System.Runtime.InteropServices;
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: NeutralResourcesLanguage("")]

View File

@ -12,15 +12,13 @@ namespace Borepin.PageModel
{ {
public class HostSelectPageModel : BindableBase public class HostSelectPageModel : BindableBase
{ {
private INavigationService _NavigationService; private readonly INavigationService _NavigationService;
private IBFFHService _BFFHService; private readonly IBFFHService _BFFHService;
private IConnectionService _ConnectionService;
public HostSelectPageModel(INavigationService navigationService, IBFFHService bffhService, IConnectionService connectionService) public HostSelectPageModel(INavigationService navigationService, IBFFHService bffhService)
{ {
_NavigationService = navigationService; _NavigationService = navigationService;
_BFFHService = bffhService; _BFFHService = bffhService;
_ConnectionService = connectionService;
UseHostCommand = new Command(UseHostCommandExecuted); UseHostCommand = new Command(UseHostCommandExecuted);
DetectHostCommand = new Command(DetectHostCommandExecuted); DetectHostCommand = new Command(DetectHostCommandExecuted);

View File

@ -10,7 +10,7 @@ namespace Borepin.Service.BFFH
{ {
public class BFFHService : IBFFHService public class BFFHService : IBFFHService
{ {
private ICredentialService _CredentialService; private readonly ICredentialService _CredentialService;
private FabAccessAPI.Connection _Connection; private FabAccessAPI.Connection _Connection;
@ -59,7 +59,7 @@ namespace Borepin.Service.BFFH
{ {
string password = await _CredentialService.GetPasswordAsync(ActiveConnection); string password = await _CredentialService.GetPasswordAsync(ActiveConnection);
await _Connection.Auth("PLAIN", new Dictionary<string, object> { { "Username", ActiveConnection.Username }, { "Password", "secret" } }); await _Connection.Auth("PLAIN", new Dictionary<string, object> { { "Username", ActiveConnection.Username }, { "Password", password } });
return await Task.FromResult(true); return await Task.FromResult(true);
} }

View File

@ -9,8 +9,8 @@ using System.Threading.Tasks;
namespace FabAccessAPI { namespace FabAccessAPI {
public class Connection { public class Connection {
#region private variables #region private variables
private TcpRpcClient? _rpcClient = null; private readonly TcpRpcClient? _rpcClient = null;
private IBootstrap? _bootstrapCap = null; private readonly IBootstrap? _bootstrapCap = null;
private Auth? _auth = null; private Auth? _auth = null;
private Machines? _machines = null; private Machines? _machines = null;
#endregion #endregion

View File

@ -12,12 +12,8 @@ namespace FabAccessAPI
/// Wraps a capability for accessing the Machines subsystem of BFFH /// Wraps a capability for accessing the Machines subsystem of BFFH
/// </summary> /// </summary>
public class Machines { public class Machines {
#region Log
private static readonly log4net.ILog _Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion
private readonly IMachines _machinesCap;
private IMachines _machinesCap;
/// <summary> /// <summary>
/// Constructs the Wrapper Class from a given capability. /// Constructs the Wrapper Class from a given capability.
@ -71,7 +67,7 @@ namespace FabAccessAPI
/// even have `read` set and are unable to even see if the machine is currently in use. /// even have `read` set and are unable to even see if the machine is currently in use.
/// </summary> /// </summary>
public class Machine { public class Machine {
private Schema.Machine _machine; private readonly Schema.Machine _machine;
/// <summary> /// <summary>
/// Constructs the Wrapper Class from a given capability /// Constructs the Wrapper Class from a given capability

View File

@ -85,7 +85,7 @@ namespace FabAccessAPI_Test {
Machine testmachine = await machines.GetMachine("Testmachine"); Machine testmachine = await machines.GetMachine("Testmachine");
Assert.NotNull(testmachine); Assert.NotNull(testmachine);
IGiveBack giveBack = await testmachine.Use(); await testmachine.Use();
FabAccessAPI.Schema.Machine.MInfo minfo = await testmachine.GetMInfo(); FabAccessAPI.Schema.Machine.MInfo minfo = await testmachine.GetMInfo();
Assert.NotNull(minfo); Assert.NotNull(minfo);