// Load items using the specified loader public async void Load(ILoader loader) { _loader = loader; _loadingStatusIndicator.LoadingMessage = _loader.LoadingMessage; var selectedItem = _list.SelectedItem as SearchResultPackageMetadata; _items.Clear(); _items.Add(_loadingStatusIndicator); _startIndex = 0; // now the package list await Load(); if (selectedItem != null) { // select the the previously selected item if it still exists. foreach (var item in _list.Items) { var package = item as SearchResultPackageMetadata; if (package == null) { continue; } if (package.Id.Equals(selectedItem.Id, StringComparison.OrdinalIgnoreCase)) { _list.SelectedItem = item; break; } } } }
public static QueryBoostingContext Load(string fileName, ILoader loader, FrameworkLogger logger) { try { using (var reader = loader.GetReader(fileName)) { var serializer = new JsonSerializer(); var value = serializer.Deserialize<QueryBoostingContext>(reader); return value; } } catch (Exception ex) { if (IndexingUtils.IsFatal(ex)) { throw; } logger.LogError($"Unable to load {fileName}.", ex); } return Default; }
public GCalculationView() { InitializeComponent(); this._lstMonitor = new List<ICalculationMonitor>(); //_fcName = new TnFeatureClassName(); _dicSql = new Dictionary<EnumG1ArcGisTnRecType, string>(); //_dicSql.Add(EnumG1ArcGisTnRecType.Doanduong, string.Format("select {0},{1},{2} from {3} where {4}=N'{5}'", _fcName.FC_DUONG.MA_DUONG, _fcName.FC_DUONG.BAT_DAU, _fcName.FC_DUONG.KET_THUC, "sde.thixa_duong", _fcName.FC_DUONG.TEN_DUONG, v)); //_dicSql.Add(EnumG1ArcGisTnRecType.Doanduong, ); //_sql = string.Format("select {0},{1},{2} from {3} where {4}='a'", _fcName.FC_DUONG.MA_DUONG, _fcName.FC_DUONG.BAT_DAU, _fcName.FC_DUONG.KET_THUC, "sde.thixa_duong", _fcName.FC_DUONG.TEN_DUONG); //_dicSql.Add(EnumG1ArcGisTnRecType.Doanduong, ""); //_dicSql.Add(EnumG1ArcGisTnRecType.Duong, string.Format("select distinct {0} from {1}", _fcName.FC_DUONG.TEN_DUONG, "sde.thixa_duong")); //_dicSql.Add(EnumG1ArcGisTnRecType.Huyen, ""); //_dicSql.Add(EnumG1ArcGisTnRecType.Xa, string.Format("select {0},{1} from {2}", _fcName.FC_RANH_XA_POLY.MA_XA, _fcName.FC_RANH_XA_POLY.TEN_XA, "sde.THIXA_XAPOLY")); _dicSql.Add(EnumG1ArcGisTnRecType.Doanduong, ""); _dicSql.Add(EnumG1ArcGisTnRecType.Duong, ""); _dicSql.Add(EnumG1ArcGisTnRecType.Huyen, ""); _dicSql.Add(EnumG1ArcGisTnRecType.Xa, ""); _loader = new Loader(this); _loader.Finished += new LoaderFinishedEventHandler(loader_Finished); _loaderController = new LoaderController(this, _loader); this.btnCloseFrmTinhAll.Click += new EventHandler(btnCloseFrmTinhAll_Click); this.cbxDuong.Click += new EventHandler(cbxDuong_Click); this.cbxXa.Click += new EventHandler(cbxXa_Click); this.cbxDoanDuong.Click += new EventHandler(cbxDoanDuong_Click); }
public void Setup() { this.mr = new MockRepository(); this.sc = new ServiceContainer(); loader = mr.Stub<ILoader>(); arch = mr.StrictMock<IProcessorArchitecture>(); Address dummy; arch.Stub(a => a.TryParseAddress(null, out dummy)).IgnoreArguments().WhenCalled(m => { Address addr; var sAddr = (string)m.Arguments[0]; var iColon = sAddr.IndexOf(':'); if (iColon > 0) { addr = Address.SegPtr( Convert.ToUInt16(sAddr.Remove(iColon)), Convert.ToUInt16(sAddr.Substring(iColon+1))); m.ReturnValue = true; } else { m.ReturnValue = Address32.TryParse32((string)m.Arguments[0], out addr); } m.Arguments[1] = addr; }).Return(false); }
public void Setup() { mr = new MockRepository(); form = new MainForm(); sc = new ServiceContainer(); loader = mr.StrictMock<ILoader>(); dec = mr.StrictMock<IDecompiler>(); sc = new ServiceContainer(); uiSvc = new FakeShellUiService(); host = mr.StrictMock<DecompilerHost>(); memSvc = mr.StrictMock<ILowLevelViewService>(); var mem = new MemoryArea(Address.Ptr32(0x10000), new byte[1000]); var imageMap = new SegmentMap( mem.BaseAddress, new ImageSegment("code", mem, AccessMode.ReadWriteExecute)); var arch = mr.StrictMock<IProcessorArchitecture>(); var platform = mr.StrictMock<IPlatform>(); program = new Program(imageMap, arch, platform); project = new Project { Programs = { program } }; browserSvc = mr.StrictMock<IProjectBrowserService>(); sc.AddService<IDecompilerUIService>(uiSvc); sc.AddService(typeof(IDecompilerShellUiService), uiSvc); sc.AddService(typeof(IDecompilerService), new DecompilerService()); sc.AddService(typeof(IWorkerDialogService), new FakeWorkerDialogService()); sc.AddService(typeof(DecompilerEventListener), new FakeDecompilerEventListener()); sc.AddService(typeof(IProjectBrowserService), browserSvc); sc.AddService(typeof(ILowLevelViewService), memSvc); sc.AddService<ILoader>(loader); sc.AddService<DecompilerHost>(host); i = new TestInitialPageInteractor(sc, dec); }
public void Setup() { mr = new MockRepository(); form = new MainForm(); sc = new ServiceContainer(); loader = mr.StrictMock<ILoader>(); dec = mr.StrictMock<IDecompiler>(); sc = new ServiceContainer(); uiSvc = new FakeShellUiService(); host = mr.StrictMock<DecompilerHost>(); memSvc = mr.StrictMock<ILowLevelViewService>(); var image = new LoadedImage(Address.Ptr32(0x10000), new byte[1000]); var imageMap = image.CreateImageMap(); var arch = mr.StrictMock<IProcessorArchitecture>(); arch.Stub(a => a.CreateRegisterBitset()).Return(new BitSet(32)); arch.Replay(); var platform = mr.StrictMock<Platform>(null, arch); arch.BackToRecord(); program = new Program(image, imageMap, arch, platform); project = new Project { Programs = { program } }; browserSvc = mr.StrictMock<IProjectBrowserService>(); sc.AddService<IDecompilerUIService>(uiSvc); sc.AddService(typeof(IDecompilerShellUiService), uiSvc); sc.AddService(typeof(IDecompilerService), new DecompilerService()); sc.AddService(typeof(IWorkerDialogService), new FakeWorkerDialogService()); sc.AddService(typeof(DecompilerEventListener), new FakeDecompilerEventListener()); sc.AddService(typeof(IProjectBrowserService), browserSvc); sc.AddService(typeof(ILowLevelViewService), memSvc); sc.AddService<ILoader>(loader); i = new TestInitialPageInteractor(sc, dec); }
public MazeFactory(string[] arguments, string loaderOption, string solverOption, string displayerOption) { this.arguments = arguments; loader = GetLoader(loaderOption); solver = GetSolver(solverOption); displayer = GetDisplayer(displayerOption); }
public IssueDetailsPageViewModel(IDeviceService deviceService, ILoader loader, IProgressService progressService, INavigationService navigationService) : base(loader, progressService, navigationService) { _deviceService = deviceService; }
public AfterglowRuntime(IDatabase database, ILogger logger, ILoader loader) { this._database = database; this._logger = logger; this.Loader = loader; Settings = new Settings(database.AddTable("Settings"), logger, this); }
protected BaseViewModel(ILoader loader, IProgressService progressService, INavigationService navigationService) { Loader = loader; Loader.LoadingChanged += (sender, args) => IsLoadingChanged(Loader.IsLoading); _progressService = progressService; NavigationService = navigationService; }
public IModel Load(CADType c, ILoader loader) { if (_parsers.ContainsKey(c)) { return _parsers[c].Parse(loader.Load()); } throw new Exception("Can't parse given type."); }
public void SetUp() { log = Substitute.For<ILog>(); loader = Substitute.For<ILoader>(); compiler = Substitute.For<ICompiler>(); compileCommand = new CompileCommand(log, loader, compiler); }
public WebSearchProvider( ILoader<HtmlDocument> loader, ISpliter<HtmlDocument, HtmlNode> spliter, IBuilder<HtmlNode> builder) { _loader = loader; _spliter = spliter; _builder = builder; }
public IssueListPageViewModel(ILoader loader, ILoader listLoader, IProgressService progressService, INavigationService navigationService, IIssueService issueService) : base(loader, listLoader, progressService, navigationService) { _issueService = issueService; Title = IssueList.Title; }
public AboutPageViewModel(IDeviceService deviceService, ILoader loader, IProgressService progressService, INavigationService navigationService) : base(loader, progressService, navigationService) { _deviceService = deviceService; Version = "1.0"; }
public void Load(string name, ILoader loader, FrameworkLogger logger) { // The data in downloads.v1.json will be an array of Package records - which has Id, Array of Versions and download count. // Sample.json : [["AutofacContrib.NSubstitute",["2.4.3.700",406],["2.5.0",137]],["Assman.Core",["2.0.7",138]].... using (var jsonReader = loader.GetReader(name)) { try { jsonReader.Read(); while (jsonReader.Read()) { try { if (jsonReader.TokenType == JsonToken.StartArray) { JToken record = JToken.ReadFrom(jsonReader); string id = String.Intern(record[0].ToString().ToLowerInvariant()); // The second entry in each record should be an array of versions, if not move on to next entry. // This is a check to safe guard against invalid entries. if (record.Count() == 2 && record[1].Type != JTokenType.Array) { continue; } if (!_downloads.ContainsKey(id)) { _downloads.Add(id, new DownloadsByVersion()); } var versions = _downloads[id]; foreach (JToken token in record) { if (token != null && token.Count() == 2) { string version = String.Intern(token[0].ToString().ToLowerInvariant()); versions[version] = token[1].ToObject<int>(); } } } } catch (JsonReaderException ex) { logger.LogInformation("Invalid entry found in downloads.v1.json. Exception Message : {0}", ex.Message); } } } catch (JsonReaderException ex) { logger.LogError("Data present in downloads.v1.json is invalid. Couldn't get download data.", ex); } } }
public LoginPageViewModel(ILoader loader, IProgressService progressService, INavigationService navigationService, ILoginService loginService, IEventAggregator eventAggregator) : base(loader, progressService, navigationService) { Loader.LoadingChanged += (sender, args) => LoginCommand.RaiseCanExecuteChanged(); _loginService = loginService; _eventAggregator = eventAggregator; }
public LogWorkPageViewModel(ILoader loader, IProgressService progressService, INavigationService navigationService, IWorkLogService workLogService) : base(loader, progressService, navigationService) { _workLogService = workLogService; Title = LogWork.Title; Date = DateTime.Now; }
public RepoListPageViewModel(ILoader loader, ILoader listLoader, IProgressService progressService, INavigationService navigationService, IRepoService repoService) : base(loader, listLoader, progressService, navigationService) { _repoService = repoService; Title = RepoList.Title; }
public DecompilerDriver(ILoader ldr, IServiceProvider services) { if (ldr == null) throw new ArgumentNullException("ldr"); if (services == null) throw new ArgumentNullException("services"); this.loader = ldr; this.host = services.RequireService<DecompilerHost>(); this.services = services; this.eventListener = services.GetService<DecompilerEventListener>(); }
public WorkLogsPageViewModel(ILoader loader, ILoader listLoader, IProgressService progressService, INavigationService navigationService, IWorkLogService workLogService) : base(loader, listLoader, progressService, navigationService) { _workLogService = workLogService; Title = Resources.Strings.WorkLogs.Title; }
public void Setup() { mr = new MockRepository(); var config = new FakeDecompilerConfiguration(); var host = new FakeDecompilerHost(); var sp = new ServiceContainer(); loader = mr.StrictMock<ILoader>(); sp.AddService(typeof(DecompilerEventListener), new FakeDecompilerEventListener()); loader.Replay(); decompiler = new TestDecompiler(loader, host, sp); loader.BackToRecord(); }
public static string GetCompanyRoster(ILoader<IEnumerable<Company>> companyByName) { IEnumerable<Company> companies = companyByName.Load(); var b = new StringBuilder(); b.Append("<html><body>"); foreach (Company company in companies) { b.Append("<li>{0}</li>".FormatWith(company.Name)); } b.Append("</body></html>"); return b.ToString(); }
private Task LoadReposAsync(ILoader loader) { Repos = null; return loader.LoadAsync(async cancellationToken => { var repos = await _repoService.GetReposAsync(cancellationToken); Repos = repos; }); }
private Task LoadWorkLogsAsync(ILoader loader) { WorkLogs = null; return loader.LoadAsync(async cancellationToken => { var logs = await _workLogService.GetLogsAsync(_repo.Path, _issue.Number, cancellationToken); WorkLogs = logs; }); }
private Task LoadIssuesAsync(ILoader loader) { _issues = null; TriggerIssuesPropertyChanged(); return loader.LoadAsync(async cancellationToken => { var issues = await _issueService.GetIssuesAsync(_repo.Path, cancellationToken); _issues = issues.Select(issue => new IssueViewModel(issue)).ToList(); TriggerIssuesPropertyChanged(); }); }
public FastStartAgent(AgentConfiguration config, ILoader<INotificationEventPublisher> publisherLoader, ILoader<IHealthCheckSchedulerPlugin> checksLoader, ILoader<IActivityPlugin> activitiesLoader) : base(config, publisherLoader, checksLoader, activitiesLoader) { InternalIdentity = new PluginDescriptor { Description = "Fast Startup Agent", Name = "FastStartAgent", TypeId = new Guid("F90773BA-C659-4964-B22D-A998719CB1FD") }; _startingGate = new ManualResetEvent(false); }
public override async Task<bool> PrepareAsync(WebClient client, CancellationToken cancellation) { var downloadPage = await client.DownloadStringTaskAsync(Url); if (cancellation.IsCancellationRequested) return false; var match = Regex.Match(downloadPage, @"<p class=""download""><a href=""([^""]+)"); if (!match.Success) { NonfatalError.Notify(ToolsStrings.Common_CannotDownloadFile, ToolsStrings.DirectLoader_AcClubChanged); return false; } Url = HttpUtility.HtmlDecode(match.Groups[1].Value); Logging.Write("AssettoCorsa.club download link: " + Url); _innerLoader = FlexibleLoader.CreateLoader(Url); if (_innerLoader is AcClubLoader) throw new Exception(ToolsStrings.DirectLoader_RecursionDetected); return await _innerLoader.PrepareAsync(client, cancellation); }
/// <summary> /// Initializes a new instance of the <see cref="Catalog"/> class using given culture info /// and loads data using given loader. /// </summary> /// <param name="loader">Loader instance.</param> /// <param name="cultureInfo">Culture info.</param> public Catalog(ILoader loader, CultureInfo cultureInfo) : this(cultureInfo) { try { this.Load(loader); } #if NETSTANDARD1_0 catch (FileNotFoundException) { } #else catch (FileNotFoundException exception) { // Suppress FileNotFound exceptions Trace.WriteLine(String.Format("Translation file loading fail: {0}", exception.Message), "NGettext"); } #endif }
public Agent(AgentConfiguration config, ILoader<INotificationEventPublisher> publisherLoader, ILoader<IHealthCheckSchedulerPlugin> checksLoader, ILoader<IActivityPlugin> activitiesLoader) { _config = config; PublisherLoader = publisherLoader; ChecksLoader = checksLoader; ActivitiesLoader = activitiesLoader; InternalIdentity = new PluginDescriptor { Description = "Agent description [TODO]", Name = "Agent", TypeId = new Guid("649D0AAC-3AA0-4457-B82D-F834EA324CFA") }; }
public SomeClassThatDependsOnLoader(ILoader loader) // Constructor Injection { this.loader = loader ?? throw new ArgumentNullException(nameof(loader)); }
public LogicQuery(ILoader <T, U, V> loader) : base(loader) { }
public virtual IDecompiler CreateDecompiler(ILoader ldr) { return(new Decompiler(ldr, sc)); }
public static void AddLoader(ILoader loader) { _loaders.Add(loader); }
public bool OpenBinaryAs() { IOpenAsDialog dlg = null; IProcessorArchitecture arch = null; try { dlg = dlgFactory.CreateOpenAsDialog(); dlg.Services = sc; if (uiSvc.ShowModalDialog(dlg) != DialogResult.OK) { return(true); } var rawFileOption = (ListOption)dlg.RawFileTypes.SelectedValue; string archName = null; string envName = null; string sAddr = null; string loader = null; EntryPointElement entry = null; if (rawFileOption != null && rawFileOption.Value != null) { RawFileElement raw = null; raw = (RawFileElement)rawFileOption.Value; loader = raw.Loader; archName = raw.Architecture; envName = raw.Environment; sAddr = raw.BaseAddress; entry = raw.EntryPoint; } archName = archName ?? (string)((ListOption)dlg.Architectures.SelectedValue).Value; var envOption = (OperatingEnvironment)((ListOption)dlg.Platforms.SelectedValue).Value; envName = envName ?? (envOption?.Name); sAddr = sAddr ?? dlg.AddressTextBox.Text.Trim(); arch = config.GetArchitecture(archName); if (arch == null) { throw new InvalidOperationException(string.Format("Unable to load {0} architecture.", archName)); } if (!arch.TryParseAddress(sAddr, out var addrBase)) { throw new ApplicationException(string.Format("'{0}' doesn't appear to be a valid address.", sAddr)); } var details = new LoadDetails { LoaderName = loader, ArchitectureName = archName, PlatformName = envName, LoadAddress = sAddr, EntryPoint = entry, }; OpenBinary(dlg.FileName.Text, (f) => pageInitial.OpenBinaryAs( f, details)); } catch (Exception ex) { uiSvc.ShowError( ex, string.Format("An error occurred when opening the binary file {0}.", dlg.FileName.Text)); } return(true); }
public ProjectLoader(IServiceProvider services, ILoader loader, Project project) : base(services) { this.loader = loader; this.project = project; }
public OBJECT(ILoader dxfData, Property prop) : base(dxfData, prop) { }
protected override IDecompiler CreateDecompiler(ILoader ldr) { return(decompiler); }
public static ILoader SBC_IMMEDIATE(this ILoader loader, string refLabel, string label = null) { loader.Write(OPCODE.SBC_IMMEDIATE, label); loader.RefByte(refLabel); return(loader); }
public static ILoader JSR(this ILoader loader, string refLabel, string label = null) { loader.Write(OPCODE.JSR, label); loader.Ref(refLabel); return(loader); }
public static ILoader BVS(this ILoader loader, string refLabel, string label = null) { loader.Write(OPCODE.BVS, label); loader.RelativeRef(refLabel); return(loader); }
public bool OpenBinaryAs(string initialFilename) { IOpenAsDialog dlg = null; IProcessorArchitecture arch = null; try { dlg = dlgFactory.CreateOpenAsDialog(); dlg.FileName.Text = initialFilename; dlg.Services = sc; dlg.ArchitectureOptions = new Dictionary <string, object>(StringComparer.OrdinalIgnoreCase); if (uiSvc.ShowModalDialog(dlg) != DialogResult.OK) { return(false); } var rawFileOption = (ListOption)dlg.RawFileTypes.SelectedValue; string archName = null; string envName = null; string sAddr = null; string loader = null; EntryPointDefinition entry = null; if (rawFileOption != null && rawFileOption.Value != null) { var raw = (RawFileDefinition)rawFileOption.Value; loader = raw.Loader; archName = raw.Architecture; envName = raw.Environment; sAddr = raw.BaseAddress; entry = raw.EntryPoint; } ArchitectureDefinition archOption = dlg.GetSelectedArchitecture(); PlatformDefinition envOption = dlg.GetSelectedEnvironment(); archName = archName ?? archOption?.Name; envName = envName ?? envOption?.Name; sAddr = sAddr ?? dlg.AddressTextBox.Text.Trim(); arch = config.GetArchitecture(archName); if (arch == null) { throw new InvalidOperationException(string.Format("Unable to load {0} architecture.", archName)); } arch.LoadUserOptions(dlg.ArchitectureOptions); if (!arch.TryParseAddress(sAddr, out var addrBase)) { throw new ApplicationException(string.Format("'{0}' doesn't appear to be a valid address.", sAddr)); } var details = new LoadDetails { LoaderName = loader, ArchitectureName = archName, ArchitectureOptions = dlg.ArchitectureOptions, PlatformName = envName, LoadAddress = sAddr, EntryPoint = entry, }; OpenBinary(dlg.FileName.Text, (f) => pageInitial.OpenBinaryAs(f, details), f => false); } catch (Exception ex) { uiSvc.ShowError( ex, string.Format("An error occurred when opening the binary file {0}.", dlg.FileName.Text)); } return(true); }
public ProjectLoader(IServiceProvider services, ILoader loader, DecompilerEventListener listener) : this(services, loader, new Project(), listener) { }
public TestDecompiler(ILoader loader, IServiceProvider sp) : base(loader, sp) { }
/// <summary> /// 任何一个加载完成后,移除这个加载器的事件监听 /// </summary> /// <param name="obj"></param> private void OnOneEndHandler(ILoader obj) { obj.onLoadComplete.RemoveEventListener(OnOneLoadCompleteHandler); obj.onLoadError.RemoveEventListener(OnOneLoadErrorHandler); }
public ContentTypeLoaderDecorator(ILoader loader, ContentType contentType) : base(loader) { _contentType = contentType; }
public ProjectLoader(IServiceProvider services, ILoader loader) : this(services, loader, new Project()) { }
/// <summary> /// Initializes the <paramref name="loader"/> instance /// with the given <paramref name="assemblyLoader"/> instance. /// </summary> /// <param name="loader">The loader being configured.</param> /// <param name="assemblyLoader">The assembly loader that will load the types into the loader itself.</param> protected abstract void Initialize(ILoader <TTarget> loader, IAssemblyTargetLoader <TTarget, TAssembly, TType> assemblyLoader);
public APPID(ILoader dxfData, Property prop) : base(dxfData, prop) { }
public JsEnv(ILoader loader, int debugPort = -1) : this(loader, debugPort, IntPtr.Zero, IntPtr.Zero) { }
public static ILoader STA_INDIRECT_Y(this ILoader loader, string refLabel, string label = null) { loader.Write(OPCODE.STA_INDIRECT_Y, label); loader.ZeroPageRef(refLabel); return(loader); }
public WebElementProxy(ILoader <IWebElement> loader) : base(loader) { }
protected virtual IDecompiler CreateDecompiler(ILoader ldr) { return(new Decompiler(ldr, Services)); }
public static ILoader STY_ZERO_PAGE_X(this ILoader loader, string refLabel, string label = null) { loader.Write(OPCODE.STY_ZERO_PAGE_X, label); loader.ZeroPageRef(refLabel); return(loader); }
public TimeoutLoaderDecorator(ILoader loader, TimeSpan timeout) : base(loader) { _timeout = timeout; }
public static ILoader AND_ABSOLUTE_Y(this ILoader loader, string refLabel, string label = null) { loader.Write(OPCODE.AND_ABSOLUTE_Y, label); loader.Ref(refLabel); return(loader); }
internal OnlinerScraper(ILoader loader) { _loader = loader; }
public XmlConfiger(string xmlPath, string xmlRootNodeName, ILoader loader) { ConfigDict = new Dictionary <string, string>(); Loader = loader; AnalysisXml(xmlPath, xmlRootNodeName); }
private void CreateServices(IServiceFactory svcFactory, IServiceContainer sc) { config = svcFactory.CreateDecompilerConfiguration(); sc.AddService(typeof(IConfigurationService), config); var cmdFactory = new Commands.CommandFactory(sc); sc.AddService <ICommandFactory>(cmdFactory); var sbSvc = svcFactory.CreateStatusBarService(); sc.AddService <IStatusBarService>(sbSvc); diagnosticsSvc = svcFactory.CreateDiagnosticsService(); sc.AddService(typeof(IDiagnosticsService), diagnosticsSvc); decompilerSvc = svcFactory.CreateDecompilerService(); sc.AddService(typeof(IDecompilerService), decompilerSvc); sc.AddService(typeof(IDecompilerUIService), uiSvc); var codeViewSvc = svcFactory.CreateCodeViewerService(); sc.AddService <ICodeViewerService>(codeViewSvc); var segmentViewSvc = svcFactory.CreateImageSegmentService(); sc.AddService(typeof(ImageSegmentService), segmentViewSvc); var del = svcFactory.CreateDecompilerEventListener(); workerDlgSvc = (IWorkerDialogService)del; sc.AddService(typeof(IWorkerDialogService), workerDlgSvc); sc.AddService <DecompilerEventListener>(del); sc.AddService <IDecompiledFileService>(svcFactory.CreateDecompiledFileService()); loader = svcFactory.CreateLoader(); sc.AddService <ILoader>(loader); var abSvc = svcFactory.CreateArchiveBrowserService(); sc.AddService <IArchiveBrowserService>(abSvc); sc.AddService <ILowLevelViewService>(svcFactory.CreateMemoryViewService()); sc.AddService <IDisassemblyViewService>(svcFactory.CreateDisassemblyViewService()); var tlSvc = svcFactory.CreateTypeLibraryLoaderService(); sc.AddService <ITypeLibraryLoaderService>(tlSvc); this.projectBrowserSvc = svcFactory.CreateProjectBrowserService(); sc.AddService <IProjectBrowserService>(projectBrowserSvc); this.procedureListSvc = svcFactory.CreateProcedureListService(); sc.AddService <IProcedureListService>(procedureListSvc); var upSvc = svcFactory.CreateUiPreferencesService(); sc.AddService <IUiPreferencesService>(upSvc); srSvc = svcFactory.CreateSearchResultService(); sc.AddService <ISearchResultService>(srSvc); var callHierSvc = svcFactory.CreateCallHierarchyService(); sc.AddService <ICallHierarchyService>(callHierSvc); this.searchResultsTabControl = svcFactory.CreateTabControlHost(); sc.AddService <ITabControlHostService>(this.searchResultsTabControl); var resEditService = svcFactory.CreateResourceEditorService(); sc.AddService <IResourceEditorService>(resEditService); var cgvSvc = svcFactory.CreateCallGraphViewService(); sc.AddService <ICallGraphViewService>(cgvSvc); var viewImpSvc = svcFactory.CreateViewImportService(); sc.AddService <IViewImportsService>(viewImpSvc); var symLdrSvc = svcFactory.CreateSymbolLoadingService(); sc.AddService <ISymbolLoadingService>(symLdrSvc); var selSvc = svcFactory.CreateSelectionService(); sc.AddService <ISelectionService>(selSvc); var testGenSvc = svcFactory.CreateTestGenerationService(); sc.AddService <ITestGenerationService>(testGenSvc); }
/// <summary> /// Searches the loader for an <see cref="IAssemblyTargetLoader{T}"/> /// instance and uses its derived classes to initialize /// the assembly target loader. /// </summary> /// <param name="source">The <see cref="ILoader{TTarget}"/> instance that will hold the plugin.</param> public void Initialize(ILoader <TTarget> source) { Initialize(source, _assemblyLoader); }