diff --git a/Borepin/Borepin.UWP/Properties/AssemblyInfo.cs b/Borepin/Borepin.UWP/Properties/AssemblyInfo.cs index 1f214f7..2fedb2d 100644 --- a/Borepin/Borepin.UWP/Properties/AssemblyInfo.cs +++ b/Borepin/Borepin.UWP/Properties/AssemblyInfo.cs @@ -1,4 +1,5 @@ -using System.Reflection; +using System.Resources; +using System.Reflection; using System.Runtime.InteropServices; // 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.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file +[assembly: ComVisible(false)] +[assembly: NeutralResourcesLanguage("")] diff --git a/Borepin/Borepin/PageModel/AddServerDialog/HostSelectPageModel.cs b/Borepin/Borepin/PageModel/AddServerDialog/HostSelectPageModel.cs index ac95c8d..142d8ac 100644 --- a/Borepin/Borepin/PageModel/AddServerDialog/HostSelectPageModel.cs +++ b/Borepin/Borepin/PageModel/AddServerDialog/HostSelectPageModel.cs @@ -12,15 +12,13 @@ namespace Borepin.PageModel { public class HostSelectPageModel : BindableBase { - private INavigationService _NavigationService; - private IBFFHService _BFFHService; - private IConnectionService _ConnectionService; + private readonly INavigationService _NavigationService; + private readonly IBFFHService _BFFHService; - public HostSelectPageModel(INavigationService navigationService, IBFFHService bffhService, IConnectionService connectionService) + public HostSelectPageModel(INavigationService navigationService, IBFFHService bffhService) { _NavigationService = navigationService; _BFFHService = bffhService; - _ConnectionService = connectionService; UseHostCommand = new Command(UseHostCommandExecuted); DetectHostCommand = new Command(DetectHostCommandExecuted); diff --git a/Borepin/Borepin/Service/BFFH/BFFHService.cs b/Borepin/Borepin/Service/BFFH/BFFHService.cs index de85dbb..1b54c5e 100644 --- a/Borepin/Borepin/Service/BFFH/BFFHService.cs +++ b/Borepin/Borepin/Service/BFFH/BFFHService.cs @@ -10,7 +10,7 @@ namespace Borepin.Service.BFFH { public class BFFHService : IBFFHService { - private ICredentialService _CredentialService; + private readonly ICredentialService _CredentialService; private FabAccessAPI.Connection _Connection; @@ -59,7 +59,7 @@ namespace Borepin.Service.BFFH { string password = await _CredentialService.GetPasswordAsync(ActiveConnection); - await _Connection.Auth("PLAIN", new Dictionary { { "Username", ActiveConnection.Username }, { "Password", "secret" } }); + await _Connection.Auth("PLAIN", new Dictionary { { "Username", ActiveConnection.Username }, { "Password", password } }); return await Task.FromResult(true); } diff --git a/FabAccessAPI/Connection.cs b/FabAccessAPI/Connection.cs index 3fe02ab..4d3384d 100644 --- a/FabAccessAPI/Connection.cs +++ b/FabAccessAPI/Connection.cs @@ -9,8 +9,8 @@ using System.Threading.Tasks; namespace FabAccessAPI { public class Connection { #region private variables - private TcpRpcClient? _rpcClient = null; - private IBootstrap? _bootstrapCap = null; + private readonly TcpRpcClient? _rpcClient = null; + private readonly IBootstrap? _bootstrapCap = null; private Auth? _auth = null; private Machines? _machines = null; #endregion diff --git a/FabAccessAPI/Machines.cs b/FabAccessAPI/Machines.cs index e38c11f..4739a5c 100644 --- a/FabAccessAPI/Machines.cs +++ b/FabAccessAPI/Machines.cs @@ -12,12 +12,8 @@ namespace FabAccessAPI /// Wraps a capability for accessing the Machines subsystem of BFFH /// public class Machines { - #region Log - private static readonly log4net.ILog _Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - #endregion - - private IMachines _machinesCap; + private readonly IMachines _machinesCap; /// /// 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. /// public class Machine { - private Schema.Machine _machine; + private readonly Schema.Machine _machine; /// /// Constructs the Wrapper Class from a given capability diff --git a/FabAccessAPI_Test/FabAccessAPITests.cs b/FabAccessAPI_Test/FabAccessAPITests.cs index f669bbd..a20fc4f 100644 --- a/FabAccessAPI_Test/FabAccessAPITests.cs +++ b/FabAccessAPI_Test/FabAccessAPITests.cs @@ -85,7 +85,7 @@ namespace FabAccessAPI_Test { Machine testmachine = await machines.GetMachine("Testmachine"); Assert.NotNull(testmachine); - IGiveBack giveBack = await testmachine.Use(); + await testmachine.Use(); FabAccessAPI.Schema.Machine.MInfo minfo = await testmachine.GetMInfo(); Assert.NotNull(minfo);