diff --git a/src/BenchmarkDotNet.Diagnostics.Windows/InliningDiagnoser.cs b/src/BenchmarkDotNet.Diagnostics.Windows/InliningDiagnoser.cs index bb9fd42ce7..a21dd1dc81 100644 --- a/src/BenchmarkDotNet.Diagnostics.Windows/InliningDiagnoser.cs +++ b/src/BenchmarkDotNet.Diagnostics.Windows/InliningDiagnoser.cs @@ -13,7 +13,7 @@ public class InliningDiagnoser : JitDiagnoser, IProfiler private readonly bool logFailuresOnly = true; private readonly bool filterByNamespace = true; - private readonly string[] allowedNamespaces = null; + private readonly string[]? allowedNamespaces = null; private string defaultNamespace; // ReSharper disable once EmptyConstructor parameterless ctor is mandatory for DiagnosersLoader.CreateDiagnoser diff --git a/src/BenchmarkDotNet.Diagnostics.Windows/Tracing/NativeMemoryLogParser.cs b/src/BenchmarkDotNet.Diagnostics.Windows/Tracing/NativeMemoryLogParser.cs index 9e269f28fb..76061eed08 100644 --- a/src/BenchmarkDotNet.Diagnostics.Windows/Tracing/NativeMemoryLogParser.cs +++ b/src/BenchmarkDotNet.Diagnostics.Windows/Tracing/NativeMemoryLogParser.cs @@ -95,7 +95,7 @@ private IEnumerable Parse(TraceLog traceLog) var heapParser = new HeapTraceProviderTraceEventParser(eventSource); // We index by heap address and then within the heap we remember the allocation stack var heaps = new Dictionary>(); - Dictionary lastHeapAllocs = null; + Dictionary? lastHeapAllocs = null; Address lastHeapHandle = 0; diff --git a/src/BenchmarkDotNet.Disassembler.x64/SourceCodeProvider.cs b/src/BenchmarkDotNet.Disassembler.x64/SourceCodeProvider.cs index 7cdb00a6d9..c9ac897570 100644 --- a/src/BenchmarkDotNet.Disassembler.x64/SourceCodeProvider.cs +++ b/src/BenchmarkDotNet.Disassembler.x64/SourceCodeProvider.cs @@ -134,7 +134,7 @@ private static SourceLocation FindNearestLine(PdbFunction function, int ilOffset return null; int distance = int.MaxValue; - SourceLocation nearest = null; + SourceLocation? nearest = null; foreach (PdbSequencePointCollection sequenceCollection in function.SequencePoints) { @@ -183,7 +183,7 @@ private static PdbReader GetReaderForMethod(ClrMethod method) ClrModule module = method?.Type?.Module; PdbInfo info = module?.Pdb; - PdbReader reader = null; + PdbReader? reader = null; if (info != null) { if (!s_pdbReaders.TryGetValue(info, out reader)) diff --git a/src/BenchmarkDotNet/Characteristics/Characteristic.cs b/src/BenchmarkDotNet/Characteristics/Characteristic.cs index 6ca88f5f75..d6e5815b4e 100644 --- a/src/BenchmarkDotNet/Characteristics/Characteristic.cs +++ b/src/BenchmarkDotNet/Characteristics/Characteristic.cs @@ -86,7 +86,7 @@ protected Characteristic( private object FallbackValue { get; } - public object this[CharacteristicObject obj] + public object? this[CharacteristicObject obj] { get { return obj.GetValue(this); } set { obj.SetValue(this, value); } diff --git a/src/BenchmarkDotNet/Disassemblers/MonoDisassembler.cs b/src/BenchmarkDotNet/Disassemblers/MonoDisassembler.cs index e8bae27870..de0e35b6dd 100644 --- a/src/BenchmarkDotNet/Disassemblers/MonoDisassembler.cs +++ b/src/BenchmarkDotNet/Disassemblers/MonoDisassembler.cs @@ -128,7 +128,7 @@ private static DisassemblyResult CreateErrorResult(IReadOnlyList input, //line example 2: 0000000000000000 subq $0x28, %rsp private static readonly Regex InstructionRegex = new Regex(@"\s*(?
[0-9a-f]+)(\:\s+([0-9a-f]{2}\s+)+)?\s+(?.*)\s*", RegexOptions.Compiled); - private static bool TryParseInstruction(string line, out MonoCode instruction) + private static bool TryParseInstruction(string line, out MonoCode? instruction) { instruction = null; var match = InstructionRegex.Match(line); diff --git a/src/BenchmarkDotNet/Disassemblers/SourceCodeProvider.cs b/src/BenchmarkDotNet/Disassemblers/SourceCodeProvider.cs index 55e31cf8b8..777c24370e 100644 --- a/src/BenchmarkDotNet/Disassemblers/SourceCodeProvider.cs +++ b/src/BenchmarkDotNet/Disassemblers/SourceCodeProvider.cs @@ -150,7 +150,7 @@ private static ManagedSymbolModule GetReaderForMethod(ClrMethod method) ClrModule module = method?.Type?.Module; PdbInfo info = module?.Pdb; - ManagedSymbolModule reader = null; + ManagedSymbolModule? reader = null; if (info != null) { if (!s_pdbReaders.TryGetValue(info, out reader)) diff --git a/src/BenchmarkDotNet/Engines/AnonymousPipesHost.cs b/src/BenchmarkDotNet/Engines/AnonymousPipesHost.cs index 6add899105..760ebb4057 100644 --- a/src/BenchmarkDotNet/Engines/AnonymousPipesHost.cs +++ b/src/BenchmarkDotNet/Engines/AnonymousPipesHost.cs @@ -63,7 +63,7 @@ public void SendSignal(HostSignal hostSignal) public void ReportResults(RunResults runResults) => runResults.Print(outWriter); [PublicAPI] // called from generated code - public static bool TryGetFileHandles(string[] args, out string writeHandle, out string readHandle) + public static bool TryGetFileHandles(string[] args, out string? writeHandle, out string? readHandle) { for (int i = 0; i < args.Length; i++) { diff --git a/src/BenchmarkDotNet/Engines/Consumer.cs b/src/BenchmarkDotNet/Engines/Consumer.cs index 1abedec0d6..55f8e3b040 100644 --- a/src/BenchmarkDotNet/Engines/Consumer.cs +++ b/src/BenchmarkDotNet/Engines/Consumer.cs @@ -31,7 +31,7 @@ private static readonly HashSet SupportedTypes private double doubleHolder; private long longHolder; private ulong ulongHolder; - private volatile object objectHolder; + private volatile object? objectHolder; private volatile IntPtr ptrHolder; private volatile UIntPtr uptrHolder; #pragma warning restore IDE0052 // Remove unread private members @@ -157,7 +157,7 @@ public void Consume(in T value) internal static bool IsConsumable(Type type) => SupportedTypes.Contains(type) || type.GetTypeInfo().IsClass || type.GetTypeInfo().IsInterface; - internal static bool HasConsumableField(Type type, out FieldInfo consumableField) + internal static bool HasConsumableField(Type type, out FieldInfo? consumableField) { var typeInfo = type.GetTypeInfo(); diff --git a/src/BenchmarkDotNet/Environments/ProcessorBrandStringHelper.cs b/src/BenchmarkDotNet/Environments/ProcessorBrandStringHelper.cs index 17f79e3202..882078df74 100644 --- a/src/BenchmarkDotNet/Environments/ProcessorBrandStringHelper.cs +++ b/src/BenchmarkDotNet/Environments/ProcessorBrandStringHelper.cs @@ -94,7 +94,7 @@ private static string GetBrandStyledActualFrequency(Frequency? frequency) { var data = ResourceHelper.LoadResource("BenchmarkDotNet.Environments.microarchitectures.txt").Split('\r', '\n'); var dictionary = new Dictionary(); - string currentMicroarchitecture = null; + string? currentMicroarchitecture = null; foreach (string line in data) { if (line.StartsWith("//") || string.IsNullOrWhiteSpace(line)) diff --git a/src/BenchmarkDotNet/Environments/Runtimes/CoreRuntime.cs b/src/BenchmarkDotNet/Environments/Runtimes/CoreRuntime.cs index bd6923d95d..1f91648f90 100644 --- a/src/BenchmarkDotNet/Environments/Runtimes/CoreRuntime.cs +++ b/src/BenchmarkDotNet/Environments/Runtimes/CoreRuntime.cs @@ -77,7 +77,7 @@ internal static CoreRuntime FromVersion(Version version) } } - internal static bool TryGetVersion(out Version version) + internal static bool TryGetVersion(out Version? version) { // we can't just use System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription // because it can be null and it reports versions like 4.6.* for .NET Core 2.* @@ -124,7 +124,7 @@ internal static bool TryGetVersion(out Version version) // sample input: // for dotnet run: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.12\ // for dotnet publish: C:\Users\adsitnik\source\repos\ConsoleApp25\ConsoleApp25\bin\Release\netcoreapp2.0\win-x64\publish\ - internal static bool TryGetVersionFromRuntimeDirectory(string runtimeDirectory, out Version version) + internal static bool TryGetVersionFromRuntimeDirectory(string runtimeDirectory, out Version? version) { if (!string.IsNullOrEmpty(runtimeDirectory) && Version.TryParse(GetParsableVersionPart(new DirectoryInfo(runtimeDirectory).Name), out version)) { @@ -141,7 +141,7 @@ internal static bool TryGetVersionFromRuntimeDirectory(string runtimeDirectory, // 2.2: 4.6.27817.03 @BuiltBy: dlab14-DDVSOWINAGE101 @Branch: release/2.2 @SrcCode: https://github.com/dotnet/coreclr/tree/ce1d090d33b400a25620c0145046471495067cc7, Microsoft .NET Framework // 3.0: 3.0.0-preview8.19379.2+ac25be694a5385a6a1496db40de932df0689b742, Microsoft .NET Core // 5.0: 5.0.0-alpha1.19413.7+0ecefa44c9d66adb8a997d5778dc6c246ad393a7, Microsoft .NET Core - internal static bool TryGetVersionFromProductInfo(string productVersion, string productName, out Version version) + internal static bool TryGetVersionFromProductInfo(string productVersion, string productName, out Version? version) { if (!string.IsNullOrEmpty(productVersion) && !string.IsNullOrEmpty(productName)) { @@ -175,7 +175,7 @@ internal static bool TryGetVersionFromProductInfo(string productVersion, string // sample input: // .NETCoreApp,Version=v2.0 // .NETCoreApp,Version=v2.1 - internal static bool TryGetVersionFromFrameworkName(string frameworkName, out Version version) + internal static bool TryGetVersionFromFrameworkName(string frameworkName, out Version? version) { const string versionPrefix = ".NETCoreApp,Version=v"; if (!string.IsNullOrEmpty(frameworkName) && frameworkName.StartsWith(versionPrefix)) diff --git a/src/BenchmarkDotNet/Exporters/Xml/XmlSerializer.cs b/src/BenchmarkDotNet/Exporters/Xml/XmlSerializer.cs index 1f4160393c..9ccbdd2323 100644 --- a/src/BenchmarkDotNet/Exporters/Xml/XmlSerializer.cs +++ b/src/BenchmarkDotNet/Exporters/Xml/XmlSerializer.cs @@ -110,7 +110,7 @@ private void WriteCollectionProperty(object source, PropertyInfo property) writer.WriteStartElement(property.Name); - string itemName = null; + string? itemName = null; foreach (var item in collection) { diff --git a/src/BenchmarkDotNet/Loggers/Broker.cs b/src/BenchmarkDotNet/Loggers/Broker.cs index 9055523340..cec11a3091 100644 --- a/src/BenchmarkDotNet/Loggers/Broker.cs +++ b/src/BenchmarkDotNet/Loggers/Broker.cs @@ -78,9 +78,8 @@ private void ProcessDataBlocking() using StreamWriter writer = new (acknowledgments, AnonymousPipesHost.UTF8NoBOM, bufferSize: 1); // Flush the data to the Stream after each write, otherwise the client will wait for input endlessly! writer.AutoFlush = true; - string line = null; - while ((line = reader.ReadLine()) is not null) + while (reader.ReadLine() is { } line) { // TODO: implement Silent mode here logger.WriteLine(LogKind.Default, line); diff --git a/src/BenchmarkDotNet/Loggers/LinqPadLogger.cs b/src/BenchmarkDotNet/Loggers/LinqPadLogger.cs index 930d19d4ca..01fa682c99 100644 --- a/src/BenchmarkDotNet/Loggers/LinqPadLogger.cs +++ b/src/BenchmarkDotNet/Loggers/LinqPadLogger.cs @@ -16,7 +16,7 @@ public sealed class LinqPadLogger : ILogger public static readonly Lazy lazyInstance = new Lazy(() => { // Detect if being run from LINQPad; see https://github.com/dotnet/BenchmarkDotNet/issues/445#issuecomment-300723741 - MethodInfo withStyle = null; + MethodInfo? withStyle = null; if (AppDomain.CurrentDomain.FriendlyName.StartsWith("LINQPad", StringComparison.OrdinalIgnoreCase)) { try diff --git a/src/BenchmarkDotNet/Toolchains/CsProj/CsProjGenerator.cs b/src/BenchmarkDotNet/Toolchains/CsProj/CsProjGenerator.cs index d732275d95..af12d018b5 100644 --- a/src/BenchmarkDotNet/Toolchains/CsProj/CsProjGenerator.cs +++ b/src/BenchmarkDotNet/Toolchains/CsProj/CsProjGenerator.cs @@ -121,7 +121,7 @@ protected virtual string GetRuntimeSettings(GcMode gcMode, IResolver resolver) // custom SDKs are not added for non-netcoreapp apps (like net471), so when the TFM != netcoreapp we dont parse " - string sdkName = null; + string? sdkName = null; if (TargetFrameworkMoniker.StartsWith("netcoreapp", StringComparison.InvariantCultureIgnoreCase)) { foreach (XmlElement importElement in projectElement.GetElementsByTagName("Import")) @@ -161,8 +161,8 @@ protected virtual string GetRuntimeSettings(GcMode gcMode, IResolver resolver) sdkName = DefaultSdkName; } - XmlDocument itemGroupsettings = null; - XmlDocument propertyGroupSettings = null; + XmlDocument? itemGroupsettings = null; + XmlDocument? propertyGroupSettings = null; GetSettingsThatNeedToBeCopied(projectElement, ref itemGroupsettings, ref propertyGroupSettings, projectFile); diff --git a/src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/ConsumeEmitter.cs b/src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/ConsumeEmitter.cs index 62fe06c649..9767cb8263 100644 --- a/src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/ConsumeEmitter.cs +++ b/src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/ConsumeEmitter.cs @@ -31,9 +31,9 @@ protected ConsumeEmitter(ConsumableTypeInfo consumableTypeInfo) protected ConsumableTypeInfo ConsumableInfo { get; } - protected ILGenerator IlBuilder { get; private set; } - protected MethodBuilder ActionMethodBuilder { get; private set; } - protected MethodInfo ActionInvokeMethod { get; private set; } + protected ILGenerator? IlBuilder { get; private set; } + protected MethodBuilder? ActionMethodBuilder { get; private set; } + protected MethodInfo? ActionInvokeMethod { get; private set; } protected RunnableActionKind? ActionKind { get; private set; } [AssertionMethod] diff --git a/src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/RunnableEmitter.cs b/src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/RunnableEmitter.cs index c6c6d8e05c..9048474329 100644 --- a/src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/RunnableEmitter.cs +++ b/src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/RunnableEmitter.cs @@ -434,7 +434,7 @@ private void DefineFields() Type argLocalsType; Type argFieldType; - MethodInfo opConversion = null; + MethodInfo? opConversion = null; if (parameterType.IsByRef) { argLocalsType = parameterType; @@ -833,8 +833,8 @@ .locals init ( var skipFirstArg = workloadMethod.IsStatic; var argLocals = EmitDeclareArgLocals(ilBuilder, skipFirstArg); - LocalBuilder callResultLocal = null; - LocalBuilder awaiterLocal = null; + LocalBuilder? callResultLocal = null; + LocalBuilder? awaiterLocal = null; if (consumableInfo.IsAwaitable) { var callResultType = consumableInfo.OriginMethodReturnType; diff --git a/src/BenchmarkDotNet/Toolchains/InProcess/Emit/InProcessEmitBuilder.cs b/src/BenchmarkDotNet/Toolchains/InProcess/Emit/InProcessEmitBuilder.cs index f46f5c99b6..7a75eb3263 100644 --- a/src/BenchmarkDotNet/Toolchains/InProcess/Emit/InProcessEmitBuilder.cs +++ b/src/BenchmarkDotNet/Toolchains/InProcess/Emit/InProcessEmitBuilder.cs @@ -11,8 +11,8 @@ public class InProcessEmitBuilder : IBuilder { public BuildResult Build(GenerateResult generateResult, BuildPartition buildPartition, ILogger logger) { - Assembly assembly = null; - Exception buildError = null; + Assembly? assembly = null; + Exception? buildError = null; try { assembly = RunnableEmitter.EmitPartitionAssembly(generateResult, buildPartition, logger); diff --git a/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchainBuilder.cs b/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchainBuilder.cs index 4d37882007..9cdc679716 100644 --- a/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchainBuilder.cs +++ b/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchainBuilder.cs @@ -17,7 +17,7 @@ public class NativeAotToolchainBuilder : CustomDotNetCliToolchainBuilder private bool ilcGenerateCompleteTypeMetadata = true; private bool ilcGenerateStackTraceData = true; private string ilcOptimizationPreference = "Speed"; - private string ilcInstructionSet = null; + private string? ilcInstructionSet = null; private bool isIlCompilerConfigured; diff --git a/src/BenchmarkDotNet/Toolchains/Toolchain.cs b/src/BenchmarkDotNet/Toolchains/Toolchain.cs index bbe5f1d94f..e680424de7 100644 --- a/src/BenchmarkDotNet/Toolchains/Toolchain.cs +++ b/src/BenchmarkDotNet/Toolchains/Toolchain.cs @@ -57,7 +57,7 @@ public virtual IEnumerable Validate(BenchmarkCase benchmarkCase } } - internal static bool IsCliPathInvalid(string customDotNetCliPath, BenchmarkCase benchmarkCase, out ValidationError validationError) + internal static bool IsCliPathInvalid(string customDotNetCliPath, BenchmarkCase benchmarkCase, out ValidationError? validationError) { validationError = null; diff --git a/src/BenchmarkDotNet/Validators/ExecutionValidatorBase.cs b/src/BenchmarkDotNet/Validators/ExecutionValidatorBase.cs index 92d7422ae2..11af691440 100644 --- a/src/BenchmarkDotNet/Validators/ExecutionValidatorBase.cs +++ b/src/BenchmarkDotNet/Validators/ExecutionValidatorBase.cs @@ -52,7 +52,7 @@ public IEnumerable Validate(ValidationParameters validationPara return errors; } - private bool TryCreateBenchmarkTypeInstance(Type type, List errors, out object instance) + private bool TryCreateBenchmarkTypeInstance(Type type, List errors, out object? instance) { try { diff --git a/tests/BenchmarkDotNet.IntegrationTests/BenchmarkSwitcherTest.cs b/tests/BenchmarkDotNet.IntegrationTests/BenchmarkSwitcherTest.cs index 695a3baeb6..e9a95fce81 100644 --- a/tests/BenchmarkDotNet.IntegrationTests/BenchmarkSwitcherTest.cs +++ b/tests/BenchmarkDotNet.IntegrationTests/BenchmarkSwitcherTest.cs @@ -135,7 +135,7 @@ public void WhenDisableLogFileWeDontWriteToFile() var logger = new OutputLogger(Output); var config = ManualConfig.CreateEmpty().AddLogger(logger).WithOptions(ConfigOptions.DisableLogFile).AddJob(Job.Dry); - string logFilePath = null; + string? logFilePath = null; try { var summaries = BenchmarkSwitcher @@ -161,7 +161,7 @@ public void EnsureLogFileIsWritten() var logger = new OutputLogger(Output); var config = ManualConfig.CreateEmpty().AddLogger(logger).AddJob(Job.Dry); - string logFilePath = null; + string? logFilePath = null; try { var summaries = BenchmarkSwitcher diff --git a/tests/BenchmarkDotNet.IntegrationTests/ExporterIOTests.cs b/tests/BenchmarkDotNet.IntegrationTests/ExporterIOTests.cs index ef8bba9095..18328994cb 100644 --- a/tests/BenchmarkDotNet.IntegrationTests/ExporterIOTests.cs +++ b/tests/BenchmarkDotNet.IntegrationTests/ExporterIOTests.cs @@ -81,7 +81,7 @@ public void ExporterUsesFullyQualifiedTypeNameAsFileName() var exporter = new MockExporter(); var mockSummary = GetMockSummary(resultsDirectoryPath, config: null, typeof(Generic)); var expectedFilePath = $"{Path.Combine(mockSummary.ResultsDirectoryPath, "BenchmarkDotNet.IntegrationTests.Generic_Int32_")}-report.txt"; - string actualFilePath = null; + string? actualFilePath = null; try { @@ -104,7 +104,7 @@ public void ExporterUsesSummaryTitleAsFileNameWhenBenchmarksJoinedToSingleSummar var joinConfig = ManualConfig.CreateEmpty().WithOptions(ConfigOptions.JoinSummary); var mockSummary = GetMockSummary(resultsDirectoryPath, joinConfig, typeof(ClassA), typeof(ClassB)); var expectedFilePath = $"{Path.Combine(mockSummary.ResultsDirectoryPath, mockSummary.Title)}-report.txt"; - string actualFilePath = null; + string? actualFilePath = null; try { diff --git a/tests/BenchmarkDotNet.IntegrationTests/InProcessTest.cs b/tests/BenchmarkDotNet.IntegrationTests/InProcessTest.cs index 4d6325116d..619eaa5740 100644 --- a/tests/BenchmarkDotNet.IntegrationTests/InProcessTest.cs +++ b/tests/BenchmarkDotNet.IntegrationTests/InProcessTest.cs @@ -123,7 +123,7 @@ private void TestInvoke(Expression> methodCall, in bool isValueTask = typeof(T).IsConstructedGenericType && typeof(T).GetGenericTypeDefinition() == typeof(ValueTask<>); - object idleExpected; + object? idleExpected; if (isValueTask) idleExpected = GetDefault(typeof(T).GetGenericArguments()[0]); else if (typeof(T).GetTypeInfo().IsValueType) diff --git a/tests/BenchmarkDotNet.Tests/Builders/HostEnvironmentInfoBuilder.cs b/tests/BenchmarkDotNet.Tests/Builders/HostEnvironmentInfoBuilder.cs index e77ee1abd9..d22256f0a9 100644 --- a/tests/BenchmarkDotNet.Tests/Builders/HostEnvironmentInfoBuilder.cs +++ b/tests/BenchmarkDotNet.Tests/Builders/HostEnvironmentInfoBuilder.cs @@ -12,7 +12,7 @@ public class HostEnvironmentInfoBuilder private string benchmarkDotNetVersion = "0.10.x-mock"; private Frequency chronometerFrequency = new Frequency(2531248); private string configuration = "CONFIGURATION"; - private string dotNetSdkVersion = "1.0.x.mock"; + private string? dotNetSdkVersion = "1.0.x.mock"; private HardwareTimerKind hardwareTimerKind = HardwareTimerKind.Tsc; private bool hasAttachedDebugger = false; private bool hasRyuJit = true; @@ -31,7 +31,7 @@ public class HostEnvironmentInfoBuilder maxFrequency: Frequency.FromMHz(3100), minFrequency: Frequency.FromMHz(3100)); - private VirtualMachineHypervisor virtualMachineHypervisor = HyperV.Default; + private VirtualMachineHypervisor? virtualMachineHypervisor = HyperV.Default; public HostEnvironmentInfoBuilder WithVMHypervisor(VirtualMachineHypervisor hypervisor) {