/// <summary> /// Will start the browser process. /// </summary> public static void Start() { var dir = AppDomain.CurrentDomain.BaseDirectory; var missingDeps = DependencyChecker.CheckDependencies(true, false, dir, string.Empty, Path.Combine(dir, "CefSharp.BrowserSubprocess.exe")); if (missingDeps?.Count > 0) { Logger.LogInfo($"Missing dependancies:{missingDeps.Aggregate((r, s) => $"{r}, {s}")}"); } var directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); directory = directory != null && directory.EndsWith("\\") ? directory : $"{directory}\\"; var settings = new CefSettings(); settings.RegisterScheme(new CefCustomScheme { SchemeName = "custom", SchemeHandlerFactory = new SchemeHandlerFactory(directory) }); settings.CefCommandLineArgs.Add("disable-gpu", "1"); Cef.Initialize(settings, true, null); }
public AssettoCorsaConnector() : base(AcExecutables) { _dependencies = new DependencyChecker( new IDependency[] { new DirectoryExistsDependency(@"apps\python\SecondMonitor"), new DirectoryExistsDependency(@"apps\python\SecondMonitor\stdlib"), new DirectoryExistsDependency(@"apps\python\SecondMonitor\stdlib64"), new FileExistsAndMatchDependency( @"apps\python\SecondMonitor\SecondMonitor.py", @"Connectors\AssettoCorsa\SecondMonitor.py"), new FileExistsAndMatchDependency( @"apps\python\SecondMonitor\smshared_mem.py", @"Connectors\AssettoCorsa\smshared_mem.py"), new FileExistsAndMatchDependency( @"apps\python\SecondMonitor\stdlib\_ctypes.pyd", @"Connectors\AssettoCorsa\stdlib\_ctypes.pyd"), new FileExistsAndMatchDependency( @"apps\python\SecondMonitor\stdlib64\_ctypes.pyd", @"Connectors\AssettoCorsa\stdlib64\_ctypes.pyd"), }, () => true); _assettoCorsaStartObserver = new AssettoCorsaStartObserver(); _physicsBuffer = new MappedBuffer <SPageFilePhysics>(AssettoCorsaShared.SharedMemoryNamePhysics); _graphicsBuffer = new MappedBuffer <SPageFileGraphic>(AssettoCorsaShared.SharedMemoryNameGraphic); _staticBuffer = new MappedBuffer <SPageFileStatic>(AssettoCorsaShared.SharedMemoryNameStatic); _secondMonitorBuffer = new MappedBuffer <SPageFileSecondMonitor>(AssettoCorsaShared.SharedMemoryNameSecondMonitor); _acDataConverter = new AcDataConverter(this, _assettoCorsaStartObserver); _rawLastSessionType = AcSessionType.AC_UNKNOWN; _lastSessionType = SessionType.Na; _lastSessionPhase = SessionPhase.Countdown; _stopwatch = new Stopwatch(); }
public RFConnector() : base(RFExecutables) { TickTime = 10; dependencies = new DependencyChecker(new FileExistDependency[] { new FileExistDependency(@"Plugins\rFactorSharedMemoryMap.dll", @"Connectors\RFactor\rFactorSharedMemoryMap.dll") }, () => true); _rfDataConvertor = new RFDataConvertor(); }
public void DependencyCheckerCheckDependenciesTest() { log.Info("-----------------------------DependencyChecker CheckDependencies-----------------------------"); // Test setup string MyPlugin1 = Path.Combine(Directory.GetCurrentDirectory(), "TapPackages/MyPlugin1.TapPackage"); string MyPlugin2 = Path.Combine(Directory.GetCurrentDirectory(), "TapPackages/MyPlugin2.1.2.37-alpha.715+164e6f81.TapPackage"); string MyPlugin3 = Path.Combine(Directory.GetCurrentDirectory(), "TapPackages/MyPlugin3.TapPackage"); // No dependencies EventTraceListener listener = new EventTraceListener(); string errors = ""; listener.MessageLogged += events => errors += Environment.NewLine + String.Join(Environment.NewLine, events.Select(m => m.Message)); Log.AddListener(listener); Installation installation = new Installation(Directory.GetCurrentDirectory()); var issues = DependencyChecker.CheckDependencies(installation, new string[] { MyPlugin1, MyPlugin2 }); Log.RemoveListener(listener); Assert.IsTrue(issues == DependencyChecker.Issue.None, errors); log.Info("No dependencies - SUCCESS"); // Dependency on plugin issues = DependencyChecker.CheckDependencies(installation, new string[] { MyPlugin1, MyPlugin2, MyPlugin3 }); Assert.IsTrue(issues == DependencyChecker.Issue.BrokenPackages, "Dependency on plugin"); log.Info("Dependency on plugin - SUCCESS"); }
public void one_module_has_lower_version_than_required_results_in_exception() { /* Graph: * A -> B (wrong version) -> C */ var upper = new Version("1.2.0.0"); var lower = new Version("1.0.0.0"); var c = SetUpModuleInfoWithVersion("C", upper); var b = SetUpModuleInfoWithVersion("B", lower, new KeyValuePair <string, Version>("C", lower)); var a = SetUpModuleInfoWithVersion("A", upper, new KeyValuePair <string, Version>("B", upper)); Modules = new[] { a, b, c }; // no expected modules but exception Assert.Throws <ArgumentException>(() => DependencyChecker.SortModules(Modules), "The modules should not be possible to sort. Missing version."); }
public void sorting_properly_modules_with_equal_high_versions() { /* More complex graph: * P * / \ * A Z * \ / * Q */ var version = new Version("2.2.1.4"); var z = SetUpModuleInfoWithVersion("Z", version); var p = SetUpModuleInfoWithVersion("P", version, new KeyValuePair <string, Version>("Z", version)); var q = SetUpModuleInfoWithVersion("Q", version, new KeyValuePair <string, Version>("Z", version)); ModuleInfo a = SetUpModuleInfoWithVersion("A", version, new KeyValuePair <string, Version>("P", version), new KeyValuePair <string, Version>("Q", version)); Modules = new[] { a, q, p, z }; ExpectedModules = new[] { z, p, q, a }; Assert.AreEqual(ExpectedModules, DependencyChecker.SortModules(Modules), "The list was sorted wrongly."); }
public void sorting_hard_linked_non_dag_list_results_in_exception() { /* * The non-dag graph: * A -> B -> C -> A * | * > X -> Y */ var a = SetUpModuleInfo("A", "B", "X"); var b = SetUpModuleInfo("B", "C"); var c = SetUpModuleInfo("C", "A"); var e = SetUpModuleInfo("X", "Y"); var x = SetUpModuleInfo("Y"); Modules = new List <ModuleInfo>() { a, b, c, e, x }; ExpectedModules = null; // perform test Assert.Throws <ArgumentException>(() => DependencyChecker.SortModules(Modules)); }
public Serializer(string inputFile) : base(inputFile) { DependencyChecker.AssertVCRedistInstalled(); Features.ChannelNameEdit = ChannelNameEditMode.All; Features.DeleteMode = DeleteMode.Physically; Features.CanSkipChannels = true; Features.CanLockChannels = true; Features.CanHideChannels = false; Features.CanHaveGaps = false; Features.EncryptedFlagEdit = true; Features.SortedFavorites = true; DataRoot.AddChannelList(avbtChannels); DataRoot.AddChannelList(avbcChannels); DataRoot.AddChannelList(dvbtChannels); DataRoot.AddChannelList(dvbcChannels); DataRoot.AddChannelList(dvbsChannels); DataRoot.AddChannelList(antennaipChannels); DataRoot.AddChannelList(cableipChannels); DataRoot.AddChannelList(satipChannels); DataRoot.AddChannelList(freesatChannels); // hide columns for fields that don't exist in Panasonic channel list foreach (ChannelList list in DataRoot.ChannelLists) { list.VisibleColumnFieldNames.Remove("PcrPid"); list.VisibleColumnFieldNames.Remove("VideoPid"); list.VisibleColumnFieldNames.Remove("AudioPid"); } }
protected void WaitForDependencies(Action <DependencyCheckerBuilder> configuration) { DependencyCheckerBuilder builder = new DependencyCheckerBuilder(ServiceProvider, Options.DependencyCheckOptions); configuration(builder); DependencyChecker = builder.Build(); }
public void NoErrorForCorrectDependencies() { string userSource = @" using StrongInject; [Registration(typeof(A))] [Registration(typeof(B))] [Registration(typeof(C))] [Registration(typeof(D))] public class Container { } public class A { public A(B b, C c){} } public class B { public B(C c, D d){} } public class C {} public class D { public D(C c){} } "; Compilation comp = CreateCompilation(userSource, MetadataReference.CreateFromFile(typeof(IAsyncContainer <>).Assembly.Location)); Assert.Empty(comp.GetDiagnostics()); var registrations = new RegistrationCalculator(comp, x => Assert.False(true, x.ToString()), default).GetRegistrations(comp.AssertGetTypeByMetadataName("Container")); var hasErrors = DependencyChecker.HasCircularOrMissingDependencies(comp.AssertGetTypeByMetadataName("A"), isAsync: true, new(registrations, comp), x => Assert.True(false, x.ToString()), ((ClassDeclarationSyntax)comp.AssertGetTypeByMetadataName("Container").DeclaringSyntaxReferences.First().GetSyntax()).Identifier.GetLocation()); Assert.False(hasErrors); }
static void Init() { DependencyChecker window = (DependencyChecker)EditorWindow.GetWindow(typeof(DependencyChecker)); window.CheckResources(); window.minSize = new Vector2(MinWidth, 300); }
public void Init() { var version = Assembly.GetExecutingAssembly().GetName().Version; DateTime buildDate = new DateTime(2000, 1, 1) .AddDays(version.Build) .AddSeconds(version.Revision * 2); Logger.InfoFormat("Running version {0}.{1}.{2}.{3} from {4}", version.Major, version.Minor, version.Build, version.Revision, buildDate.ToString("dd/MM/yyyy")); if (!DependencyChecker.CheckNet461Installed()) { MessageBox.Show("It appears .Net Framework 4.6.1 is not installed.\nIA May not function correctly", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } // TODO: Disabled due to false positives.. err negatives? /*if (!DependencyChecker.CheckVs2015Installed()) { * MessageBox.Show("It appears VS 2015 (x86) redistributable may not be installed.\nInstall VS 2015 (x86) runtimes manually if you experience issues running IA", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); * }*/ if (!DependencyChecker.CheckVs2013Installed()) { MessageBox.Show("It appears VS 2013 (x86) redistributable is not installed.\nPlease install it to continue using IA", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } if (!DependencyChecker.CheckVs2010Installed()) { MessageBox.Show("It appears VS 2010 (x86) redistributable is not installed.\nPlease install it to continue using IA", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public Rf2Connector() : base(RFExecutables) { TickTime = 16; _sessionTimeInterpolator = new SessionTimeInterpolator(TimeSpan.FromMilliseconds(190)); _dependencies = new DependencyChecker(new FileExistDependency[] { new FileExistDependency(@"Plugins\rFactor2SharedMemoryMapPlugin64.dll", @"Connectors\RFactor2\rFactor2SharedMemoryMapPlugin64.dll") }, () => true); _rf2DataConvertor = new RF2DataConvertor(_sessionTimeInterpolator); }
public void sorting_empty_list() { Modules = new List <ModuleInfo>(); ExpectedModules = new List <ModuleInfo>(); IEnumerable <ModuleInfo> result = DependencyChecker.SortModules(Modules); Assert.AreEqual(ExpectedModules, result); }
/// <summary> /// DownloadAndBuild method downloads selected libLAS version and builds it for selected parameters (i.e. x64 /// and Visual Studio 13) /// </summary> public void DownloadAndBuild() { try { if (!Directory.Exists(destinationFolder)) { Directory.CreateDirectory(destinationFolder); } message("Checking Dependencies..."); DependencyChecker.CheckCommanDependency(); message("Checking Dependencies done!"); message("Downloading libLAS..."); string libLASDownloadURL = LibLASInfo.GetDownloadURL(libLASVersion); string libLASZIPFilename = LibLASInfo.GetLibLASZipFileName(libLASVersion); DownloadHelper.DownloadFileFromURL(libLASDownloadURL, destinationFolder + libLASZIPFilename); message("Start to unzip libLAS..."); // Unzip libLAS SevenZip.Decompress(destinationFolder + "/" + libLASZIPFilename, destinationFolder); if (libLASVersion == eLibLASVersion.LibLAS1_8_0) { SevenZip.Decompress(destinationFolder + "/" + "libLAS-1.8.0.tar", destinationFolder); } message("libLAS has been unzipped!"); message("Start to build libLAS..."); runCMake(destinationFolder); runMSBuild(destinationFolder, " /property:Configuration=Release"); message("libLAS successfully built!"); // remove downloaded file if (File.Exists(Path.Combine(destinationFolder, libLASZIPFilename))) { System.IO.File.Delete(Path.Combine(destinationFolder, libLASZIPFilename)); } OnFinished(); } catch (Exception ex) { message(string.Empty); OnFailure(); MessageBox.Show(ex.ToString()); } }
public void ErrorForAllMissingDependencies1() { string userSource = @" using StrongInject; [Register(typeof(A))] [Register(typeof(B))] public class Container { } public class A { public A(B b, C c){} } public class B { public B(C c, D d){} } public class C {} public class D { } "; Compilation comp = CreateCompilation(userSource, MetadataReference.CreateFromFile(typeof(IAsyncContainer <>).Assembly.Location)); Assert.Empty(comp.GetDiagnostics()); var diagnostics = new List <Diagnostic>(); Assert.True(WellKnownTypes.TryCreate(comp, x => Assert.False(true, x.ToString()), out var wellKnownTypes)); var registrations = new RegistrationCalculator(comp, wellKnownTypes, x => Assert.False(true, x.ToString()), default).GetModuleRegistrations(comp.AssertGetTypeByMetadataName("Container")); var hasErrors = DependencyChecker.HasCircularOrMissingDependencies( comp.AssertGetTypeByMetadataName("A"), isAsync: true, new( registrations, new GenericRegistrationsResolver.Builder().Build(comp), ImmutableDictionary <ITypeSymbol, ImmutableArray <DecoratorSource> > .Empty, new(comp, ImmutableArray <DecoratorFactoryMethod> .Empty), wellKnownTypes), x => diagnostics.Add(x), ((ClassDeclarationSyntax)comp.AssertGetTypeByMetadataName("Container").DeclaringSyntaxReferences.First().GetSyntax()).Identifier.GetLocation()); Assert.True(hasErrors); diagnostics.Verify( // (6,14): Error SI0102: Error while resolving dependencies for 'A': We have no source for instance of type 'C' // Container new DiagnosticResult("SI0102", @"Container", DiagnosticSeverity.Error).WithLocation(6, 14), // (6,14): Error SI0102: Error while resolving dependencies for 'A': We have no source for instance of type 'D' // Container new DiagnosticResult("SI0102", @"Container", DiagnosticSeverity.Error).WithLocation(6, 14), // (6,14): Error SI0102: Error while resolving dependencies for 'A': We have no source for instance of type 'C' // Container new DiagnosticResult("SI0102", @"Container", DiagnosticSeverity.Error).WithLocation(6, 14)); }
public Serializer(string inputFile) : base(inputFile) { DependencyChecker.AssertVCRedistInstalled(); this.Features.ChannelNameEdit = ChannelNameEditMode.None; this.Features.DeleteMode = DeleteMode.Physically; this.Features.SortedFavorites = false; //this.Features.SupportedFavorites = new Favorites(); this.DataRoot.AddChannelList(this.allChannels); }
static void Functions_OnOnDutyStateChanged(bool onDuty) { if (onDuty) { UpdateChecker.InitialiseUpdateCheckingProcess(); if (DependencyChecker.DependencyCheckMain(PluginName, Albo1125CommonVer, MinimumRPHVersion, MadeForGTAVersion, MadeForLSPDFRVersion, RAGENativeUIVersion, AudioFilesToCheckFor, OtherFilesToCheckFor)) { if (!DependencyChecker.CheckIfFileExists("Plugins/LSPDFR/Traffic Policer.dll", TrafficPolicerVersion)) { Game.LogTrivial("Traffic Policer is out of date for BPS. Aborting. Required version: " + TrafficPolicerVersion.ToString()); Game.DisplayNotification("~r~~h~BritishP.S. detected Traffic Policer version lower than ~b~" + TrafficPolicerVersion.ToString()); ExtensionMethods.DisplayPopupTextBoxWithConfirmation("British Policing Script Dependencies", "BritishP.S. didn't detect Traffic Policer or detected Traffic Policer version lower than " + TrafficPolicerVersion.ToString() + ". Please install the appropriate version of Traffic Policer (link on the BPS download page under Requirements). Unloading British Policing Script...", true); return; } if (!DependencyChecker.CheckIfFileExists("Plugins/LSPDFR/Arrest Manager.dll", ArrestManagerVersion)) { Game.LogTrivial("Arrest Manager is out of date for BPS. Aborting. Required version: " + ArrestManagerVersion.ToString()); Game.DisplayNotification("~r~~H~BritishP.S. detected Arrest Manager version lower than ~b~" + ArrestManagerVersion.ToString()); ExtensionMethods.DisplayPopupTextBoxWithConfirmation("British Policing Script Dependencies", "BritishP.S. didn't detect Arrest Manager or detected Arrest Manager version lower than " + ArrestManagerVersion.ToString() + ". Please install the appropriate version of Arrest Manager (link on the BPS download page under Requirements). Unloading British Policing Script...", true); return; } if (!DependencyChecker.CheckIfFileExists("Plugins/LSPDFR/LSPDFR+.dll", LSPDFRPlusVersion)) { Game.LogTrivial("LSPDFR+ is out of date for BPS. Aborting. Required version: " + LSPDFRPlusVersion.ToString()); Game.DisplayNotification("~r~~H~BritishP.S. detected LSPDFR+ version lower than ~b~" + LSPDFRPlusVersion.ToString()); ExtensionMethods.DisplayPopupTextBoxWithConfirmation("British Policing Script Dependencies", "BritishP.S. didn't detect LSPDFR+ or detected LSPDFR+ version lower than " + LSPDFRPlusVersion.ToString() + ". Please install the appropriate version of LSPDFR+ (link on the BPS download page under Requirements). Unloading British Policing Script...", true); return; } GameFiber.StartNew(delegate { int WaitCount = 0; while (!IsLSPDFRPluginRunning("Traffic Policer", TrafficPolicerVersion) || !IsLSPDFRPluginRunning("Arrest Manager", ArrestManagerVersion) || !IsLSPDFRPluginRunning("LSPDFR+", LSPDFRPlusVersion)) { GameFiber.Yield(); WaitCount++; if (WaitCount > 1500) { Game.DisplayNotification("B.P.Script unable to find correct version Traffic Policer/Arrest Manager/LSPDFR+"); Game.LogTrivial("B.P.Script unable to find correct version of Traffic Police/Arrest Manager/LSPDFR+"); Game.LogTrivial("TP: " + IsLSPDFRPluginRunning("Traffic Policer", TrafficPolicerVersion).ToString()); Game.LogTrivial("AM: " + IsLSPDFRPluginRunning("Arrest Manager", ArrestManagerVersion).ToString()); Game.LogTrivial("LSPDFRPLUS: " + IsLSPDFRPluginRunning("LSPDFR + ", LSPDFRPlusVersion).ToString()); return; } } EntryPoint.Initialise(); ; }); } else { } } }
public HisDbSerializer(string inputFile) : base(inputFile) { DependencyChecker.AssertVCRedistInstalled(); Features.ChannelNameEdit = ChannelNameEditMode.All; Features.DeleteMode = DeleteMode.FlagWithPrNr; Features.CanSkipChannels = true; Features.CanLockChannels = true; Features.CanHideChannels = true; Features.CanHaveGaps = true; Features.MixedSourceFavorites = true; Features.SortedFavorites = true; }
public DbSerializer(string inputFile) : base(inputFile) { DependencyChecker.AssertVCRedistInstalled(); this.Features.ChannelNameEdit = ChannelNameEditMode.All; this.Features.DeleteMode = DeleteMode.Physically; this.Features.CanSkipChannels = true; this.Features.CanLockChannels = true; this.Features.CanHideChannels = true; this.Features.SupportedFavorites = Favorites.A | Favorites.B | Favorites.C | Favorites.D | Favorites.E; this.Features.SortedFavorites = true; this.Features.AllowGapsInFavNumbers = false; }
/// <summary> /// Checks for missing mod loader dependencies. /// </summary> private static void CheckForMissingDependencies() { var deps = new DependencyChecker(IoC.Get <LoaderConfig>(), IntPtr.Size == 8); if (!deps.AllAvailable) { ActionWrappers.ExecuteWithApplicationDispatcher(() => { var dialog = new MissingCoreDependencyDialog(deps); dialog.ShowDialog(); }); } }
/// <summary> /// DownloadAndBuild method downloads selected VTK version and builds it for selected parameters (i.e. x64 /// and Visual Studio 13) /// </summary> public void DownloadAndBuild() { try { if (!Directory.Exists(destinationFolder)) { Directory.CreateDirectory(destinationFolder); } message("Checking Dependencies..."); DependencyChecker.CheckCommanDependency(); message("Checking Dependencies done!"); message("Downloading VTK..."); string vtkDownloadURL = VTKInfo.GetDownloadURL(vtkVersion); string vtkZIPFilename = VTKInfo.GetVTKZipFileName(vtkVersion); DownloadHelper.DownloadFileFromURL(vtkDownloadURL, destinationFolder + vtkZIPFilename); message("Start to unzip VTK..."); // Unzip VTK SevenZip.Decompress(destinationFolder + "/" + vtkZIPFilename, destinationFolder); message("VTK has been unzipped!"); message("Building VTK..."); runCMake(destinationFolder); runMSBuild(destinationFolder, " /property:Configuration=" + Folder.ReleaseFolderName); message("VTK successfully built!"); // remove downloaded file if (File.Exists(Path.Combine(destinationFolder, vtkZIPFilename))) { System.IO.File.Delete(Path.Combine(destinationFolder, vtkZIPFilename)); } OnFinished(); } catch (Exception ex) { message(string.Empty); OnFailure(); MessageBox.Show(ex.ToString()); } }
/// <summary> /// Checks for missing mod loader dependencies. /// </summary> private static void CheckForMissingDependencies() { var deps = new DependencyChecker(IoC.Get <LoaderConfig>(), IntPtr.Size == 8); if (deps.AllAvailable) { return; } ActionWrappers.ExecuteWithApplicationDispatcher(() => { Actions.ShowMissingCoreDependencyDialog(new MissingCoreDependencyDialogViewModel(deps)); }); }
public HisDbSerializer(string inputFile) : base(inputFile) { DependencyChecker.AssertVCRedistInstalled(); this.Features.ChannelNameEdit = ChannelNameEditMode.All; this.Features.DeleteMode = DeleteMode.NotSupported; this.Features.CanSkipChannels = false; this.Features.CanLockChannels = true; this.Features.CanHideChannels = true; this.Features.CanHaveGaps = true; this.Features.SortedFavorites = true; channelLists.Add(new ChannelList(SignalSource.Antenna, "Antenna")); channelLists.Add(new ChannelList(SignalSource.Cable, "Cable")); channelLists.Add(new ChannelList(SignalSource.Sat, "Sat")); channelLists.Add(new ChannelList(SignalSource.Sat, "Preferred Sat")); channelLists.Add(new ChannelList(0, "CI 1")); channelLists.Add(new ChannelList(0, "CI 2")); channelLists.Add(new ChannelList(0, "Favorites")); channelLists[channelLists.Count - 1].IsMixedSourceFavoritesList = true; foreach (var list in this.channelLists) { this.DataRoot.AddChannelList(list); list.VisibleColumnFieldNames = new List <string> { "OldPosition", "Position", "Source", "NewProgramNr", "Name", "ShortName", "Favorites", "Lock", "Hidden", "Encrypted", "FreqInMhz", "OriginalNetworkId", "TransportStreamId", "ServiceId", "ServiceType", "ServiceTypeName", "NetworkName", "Satellite", "SymbolRate" }; } }
// CEF checks (MUST not initialize CEF to avoid memory usage) static CEFHost() { var settings = GetCEFSettings(); try { StopwatchAuto sw = new StopwatchAuto(); DependencyChecker.AssertAllDependenciesPresent(null, settings.LocalesDirPath, settings.ResourcesDirPath, false, settings.BrowserSubprocessPath); sw.StopAndLog(); } catch (Exception ex) { Utils.MsgBox("[HtmlView] CEFSharp initialization check failed: \n\n" + ex); } }
public void sorting_one_elment_list() { var a = SetUpModuleInfo("A"); Modules = new List <ModuleInfo>() { a }; ExpectedModules = new List <ModuleInfo>() { a }; Assert.AreEqual(ExpectedModules, DependencyChecker.SortModules(Modules), "One element list should be sorted right away"); }
public void TestDependencyChecker() { var installation = MockInstallation.GetInstallation(); var noConflictingVersions = MockInstallation.GetConflictingFiles(); // GetConflictingFiles has conflicting files, but no conflicting versions, so this should return None. var issue = DependencyChecker.CheckDependencies(installation, noConflictingVersions); Assert.AreEqual(DependencyChecker.Issue.None, issue); // Conflicting has no conflicting files, but conflicting versions, so this should return BrokenPackages. var conflictingVersion = MockInstallation.GetConflictingVersion(); issue = DependencyChecker.CheckDependencies(installation, conflictingVersion); Assert.AreEqual(DependencyChecker.Issue.BrokenPackages, issue); }
public DbSerializer(string inputFile) : base(inputFile) { DependencyChecker.AssertVCRedistInstalled(); this.Features.ChannelNameEdit = ChannelNameEditMode.All; this.Features.DeleteMode = DeleteMode.Physically; this.Features.CanSkipChannels = false; this.Features.CanLockChannels = true; this.Features.CanHideChannels = false; // true in Android/e-format this.DataRoot.AddChannelList(this.atvChannels); this.DataRoot.AddChannelList(this.dtvTvChannels); this.DataRoot.AddChannelList(this.dtvRadioChannels); this.DataRoot.AddChannelList(this.satTvChannels); this.DataRoot.AddChannelList(this.satRadioChannels); }
public void set_up() { // sick creating of dependency checker IEnumerable <ModuleInfo> outter = new List <ModuleInfo>(); DependencyChecker.Setup( x => x.CheckModules(It.IsAny <IEnumerable <ModuleInfo> >(), It.IsAny <IEnumerable <ModuleInfo> >(), out outter)) .Returns(true); ModuleFinder .Setup(x => x.FindDirectoryForPackage(It.IsAny <string>(), It.IsAny <ModulePackage>())) .Returns <string, ModulePackage>((dict, package) => dict); }
public void sorting_two_independnt_element_list() { var a = SetUpModuleInfo("A"); var b = SetUpModuleInfo("B"); Modules = new List <ModuleInfo>() { a, b }; ExpectedModules = new List <ModuleInfo>() { a, b }; Assert.AreEqual(ExpectedModules, DependencyChecker.SortModules(Modules), "Two element list with no dependencies should be sorted right away"); }