SEBWIN-917: Consolidated detectors in monitoring assembly.
This commit is contained in:
parent
6a77a41564
commit
a350949b1b
13 changed files with 19 additions and 16 deletions
|
@ -6,7 +6,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
namespace SafeExamBrowser.SystemComponents.Contracts
|
||||
namespace SafeExamBrowser.Monitoring.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides functionality related to remote session detection.
|
|
@ -6,7 +6,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
namespace SafeExamBrowser.SystemComponents.Contracts
|
||||
namespace SafeExamBrowser.Monitoring.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides functionality related to virtual machine detection.
|
|
@ -65,6 +65,8 @@
|
|||
<Compile Include="Display\IDisplayMonitor.cs" />
|
||||
<Compile Include="Display\ValidationResult.cs" />
|
||||
<Compile Include="IClipboard.cs" />
|
||||
<Compile Include="IRemoteSessionDetector.cs" />
|
||||
<Compile Include="IVirtualMachineDetector.cs" />
|
||||
<Compile Include="Keyboard\IKeyboardInterceptor.cs" />
|
||||
<Compile Include="Mouse\IMouseInterceptor.cs" />
|
||||
<Compile Include="Applications\InitializationResult.cs" />
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
using System.Windows.Forms;
|
||||
using SafeExamBrowser.Logging.Contracts;
|
||||
using SafeExamBrowser.SystemComponents.Contracts;
|
||||
using SafeExamBrowser.Monitoring.Contracts;
|
||||
|
||||
namespace SafeExamBrowser.SystemComponents
|
||||
namespace SafeExamBrowser.Monitoring
|
||||
{
|
||||
public class RemoteSessionDetector : IRemoteSessionDetector
|
||||
{
|
|
@ -67,11 +67,13 @@
|
|||
<Compile Include="Mouse\MouseInterceptor.cs" />
|
||||
<Compile Include="Applications\ApplicationMonitor.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RemoteSessionDetector.cs" />
|
||||
<Compile Include="System\Components\Cursors.cs" />
|
||||
<Compile Include="System\Components\EaseOfAccess.cs" />
|
||||
<Compile Include="System\Components\StickyKeys.cs" />
|
||||
<Compile Include="System\Components\SystemEvents.cs" />
|
||||
<Compile Include="System\SystemSentinel.cs" />
|
||||
<Compile Include="VirtualMachineDetector.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SafeExamBrowser.Logging.Contracts\SafeExamBrowser.Logging.Contracts.csproj">
|
||||
|
|
|
@ -6,12 +6,14 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using SafeExamBrowser.Logging.Contracts;
|
||||
using SafeExamBrowser.Monitoring.Contracts;
|
||||
using SafeExamBrowser.SystemComponents.Contracts;
|
||||
using SafeExamBrowser.SystemComponents.Contracts.Registry;
|
||||
|
||||
namespace SafeExamBrowser.SystemComponents
|
||||
namespace SafeExamBrowser.Monitoring
|
||||
{
|
||||
public class VirtualMachineDetector : IVirtualMachineDetector
|
||||
{
|
||||
|
@ -135,7 +137,7 @@ namespace SafeExamBrowser.SystemComponents
|
|||
|
||||
private bool HasLocalVirtualMachineDeviceCache()
|
||||
{
|
||||
var deviceName = System.Environment.GetEnvironmentVariable("COMPUTERNAME");
|
||||
var deviceName = Environment.GetEnvironmentVariable("COMPUTERNAME");
|
||||
var hasDeviceCache = false;
|
||||
var hasDeviceCacheKeys = registry.TryGetSubKeys(RegistryValue.UserHive.DeviceCache_Key, out var deviceCacheKeys);
|
||||
|
|
@ -11,10 +11,10 @@ using Moq;
|
|||
using SafeExamBrowser.Configuration.Contracts;
|
||||
using SafeExamBrowser.Core.Contracts.OperationModel;
|
||||
using SafeExamBrowser.Logging.Contracts;
|
||||
using SafeExamBrowser.Monitoring.Contracts;
|
||||
using SafeExamBrowser.Runtime.Operations;
|
||||
using SafeExamBrowser.Runtime.Operations.Events;
|
||||
using SafeExamBrowser.Settings;
|
||||
using SafeExamBrowser.SystemComponents.Contracts;
|
||||
|
||||
namespace SafeExamBrowser.Runtime.UnitTests.Operations
|
||||
{
|
||||
|
|
|
@ -11,10 +11,10 @@ using Moq;
|
|||
using SafeExamBrowser.Configuration.Contracts;
|
||||
using SafeExamBrowser.Core.Contracts.OperationModel;
|
||||
using SafeExamBrowser.Logging.Contracts;
|
||||
using SafeExamBrowser.Monitoring.Contracts;
|
||||
using SafeExamBrowser.Runtime.Operations;
|
||||
using SafeExamBrowser.Settings;
|
||||
using SafeExamBrowser.Settings.Security;
|
||||
using SafeExamBrowser.SystemComponents.Contracts;
|
||||
|
||||
namespace SafeExamBrowser.Runtime.UnitTests.Operations
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@ using SafeExamBrowser.I18n;
|
|||
using SafeExamBrowser.I18n.Contracts;
|
||||
using SafeExamBrowser.Logging;
|
||||
using SafeExamBrowser.Logging.Contracts;
|
||||
using SafeExamBrowser.Monitoring;
|
||||
using SafeExamBrowser.Monitoring.Display;
|
||||
using SafeExamBrowser.Monitoring.System;
|
||||
using SafeExamBrowser.Runtime.Communication;
|
||||
|
|
|
@ -10,8 +10,8 @@ using SafeExamBrowser.Core.Contracts.OperationModel;
|
|||
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
|
||||
using SafeExamBrowser.I18n.Contracts;
|
||||
using SafeExamBrowser.Logging.Contracts;
|
||||
using SafeExamBrowser.Monitoring.Contracts;
|
||||
using SafeExamBrowser.Runtime.Operations.Events;
|
||||
using SafeExamBrowser.SystemComponents.Contracts;
|
||||
using SafeExamBrowser.UserInterface.Contracts.MessageBox;
|
||||
|
||||
namespace SafeExamBrowser.Runtime.Operations
|
||||
|
|
|
@ -10,17 +10,17 @@ using SafeExamBrowser.Core.Contracts.OperationModel;
|
|||
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
|
||||
using SafeExamBrowser.I18n.Contracts;
|
||||
using SafeExamBrowser.Logging.Contracts;
|
||||
using SafeExamBrowser.Monitoring.Contracts;
|
||||
using SafeExamBrowser.Runtime.Operations.Events;
|
||||
using SafeExamBrowser.Settings.Security;
|
||||
using SafeExamBrowser.SystemComponents.Contracts;
|
||||
using SafeExamBrowser.UserInterface.Contracts.MessageBox;
|
||||
|
||||
namespace SafeExamBrowser.Runtime.Operations
|
||||
{
|
||||
internal class VirtualMachineOperation : SessionOperation
|
||||
{
|
||||
private IVirtualMachineDetector detector;
|
||||
private ILogger logger;
|
||||
private readonly IVirtualMachineDetector detector;
|
||||
private readonly ILogger logger;
|
||||
|
||||
public override event ActionRequiredEventHandler ActionRequired;
|
||||
public override event StatusChangedEventHandler StatusChanged;
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
<Compile Include="Network\Events\CredentialsRequiredEventHandler.cs" />
|
||||
<Compile Include="Registry\Events\RegistryValueChangedEventHandler.cs" />
|
||||
<Compile Include="Registry\IRegistry.cs" />
|
||||
<Compile Include="IRemoteSessionDetector.cs" />
|
||||
<Compile Include="IVirtualMachineDetector.cs" />
|
||||
<Compile Include="Network\ConnectionType.cs" />
|
||||
<Compile Include="PowerSupply\Events\StatusChangedEventHandler.cs" />
|
||||
<Compile Include="PowerSupply\IPowerSupply.cs" />
|
||||
|
|
|
@ -65,10 +65,8 @@
|
|||
<Compile Include="PowerSupply\PowerSupplyStatus.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Registry\Registry.cs" />
|
||||
<Compile Include="RemoteSessionDetector.cs" />
|
||||
<Compile Include="SystemInfo.cs" />
|
||||
<Compile Include="UserInfo.cs" />
|
||||
<Compile Include="VirtualMachineDetector.cs" />
|
||||
<Compile Include="Network\NetworkAdapter.cs" />
|
||||
<Compile Include="Network\WirelessNetwork.cs" />
|
||||
</ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue