public GetFileMd5HashAsyncDelegate( IStorageController <string> storageController, IGetHashAsyncDelegate <string> getStringHashAsyncDelegate) { this.storageController = storageController; this.getStringHashAsyncDelegate = getStringHashAsyncDelegate; }
public TransactionalStorageController( IStorageController <string> storageController, IFileController fileController) { this.storageController = storageController; this.fileController = fileController; }
/// <summary> /// Initialize book's collection and storage for it /// </summary> /// <param name="filePath"></param> /// <param name="storage"></param> public BookListService(string filePath, IStorageController <Book> storage) { _logger = LogManager.GetCurrentClassLogger(); Storage = storage; ListOfBooks = Storage.GetItems() as List <Book> ?? new List <Book>(); }
public PersistenceStrategy( IStorageController storageController, ILogger logger) { _storageController = storageController; _logger = logger; }
public SettingsViewModel(IEditorContext editorContext, IStorageController storageController, ITestRunner testRunner, ITelemetryManager telemetryManager, IOptions options, IIoProvider ioProvider) { _editorContext = editorContext; _storageController = storageController; _testRunner = testRunner; _options = options; _ioProvider = ioProvider; _outputDirectories = new ObservableEnumeration <OutputDirectoryViewModel>(() => storageController.GetOutputDirectories().Select(p => new OutputDirectoryViewModel(p)), (a, b) => StringComparer.OrdinalIgnoreCase.Compare(a.Name, b.Name)); _testSettingsFiles = new ObservableEnumeration <string>(() => (_editorContext?.Solution.FindFiles(new Regex("^.*\\.runSettings$", RegexOptions.Compiled | RegexOptions.IgnoreCase)) ?? new string[0]) .Select(p => _ioProvider.GetRelativePath(p)), StringComparer.OrdinalIgnoreCase.Compare); editorContext.BuildFinished += (o, e) => Refresh(); editorContext.SolutionOpened += (o, e) => Refresh(); //Fix unsupported state if (_options.IsExcludingTestAssemblies && _options.IsCoveringByTest) { _options.IsExcludingTestAssemblies = false; _options.IsCoveringByTest = false; } }
public Options(IEditorContext editorContext, IStorageController storageController) { Settings.Default.SettingChanging += OnSettingChanging; _editorContext = editorContext; _storageController = storageController; editorContext.SolutionOpened += OnSolutionOpened; }
public Options(IEditorContext editorContext, IStorageController storageController) { Settings.Default.SettingChanging += (o, e) => Application.Current.Dispatcher.BeginInvoke(() => OnSettingChanged(e.SettingName)); _editorContext = editorContext; _storageController = storageController; editorContext.SolutionOpened += OnSolutionOpened; }
public AxoTestRunner(IEditorContext editorContext, IStorageController storageController, IOptions options, ITelemetryManager telemetryManager, ITestAdapterRepository testAdapterRepository) { _editorContext = editorContext; _storageController = storageController; _options = options; _telemetryManager = telemetryManager; _testAdapterRepository = testAdapterRepository; }
public UserList(IStorageController controller) { storageController = controller; LoadListFromFile(); if (userList == null) { SetDefaultList(); } }
public SerializedStorageController( IStoredHashController storedHashController, IStorageController <string> storageController, IGetHashAsyncDelegate <string> getStringHashAsyncDelegate, ISerializationController <string> serializarionController, IStatusController statusController) { this.storedHashController = storedHashController; this.storageController = storageController; this.getStringHashAsyncDelegate = getStringHashAsyncDelegate; this.serializarionController = serializarionController; this.statusController = statusController; }
public ServiceController( IFileHelper fileHelper, ITaskHelper taskHelper, IFileValidationService fileValidationService, IStorageController storageController, IReportingController reportingController) { _fileHelper = fileHelper; _taskHelper = taskHelper; _fileValidationService = fileValidationService; _reportingController = reportingController; _storageController = storageController; }
public Model(object encryptor, object storageController) { _password = new ConcretePassword(); if (encryptor is XOR_EncryptorController) { _encryptor = encryptor as XOR_EncryptorController; } if(storageController is FILE_StorageController) { _storageController = storageController as FILE_StorageController; } }
public ServiceController( ISourceFileModelBuilder sourceFileModelBuilder, ITaskHelper taskHelper, IPeriodHelper periodHelper, IFileValidationService fileValidationService, IStorageController storageController, IReportingController reportingController, IValidationErrorMessageService validationErrorMessageService, IExcelFileService excelFileService) { _sourceFileModelBuilder = sourceFileModelBuilder; _taskHelper = taskHelper; _periodHelper = periodHelper; _fileValidationService = fileValidationService; _reportingController = reportingController; _storageController = storageController; _validationErrorMessageService = validationErrorMessageService; _excelFileService = excelFileService; }
private void CreateHardDisk(Session vmSession, IStorageController controller, int dev, int port) { IMedium rosHdd; IProgress progress; string curDir = Path.GetFullPath(Environment.CurrentDirectory); /* Create the hdd and storage */ rosHdd = vBox.CreateHardDisk(null, Path.Combine(curDir, diskFileName)); progress = rosHdd.CreateBaseStorage(hddSize, new MediumVariant[] { MediumVariant.MediumVariant_Standard }); progress.WaitForCompletion(-1); //String errStr; //progress.ErrorInfo.GetDescription(out errStr); //Console.WriteLine(errStr); /* FIXME: Make sure there is no hdd with the same name hanging around in registered condition */ /* Attach it to the vm */ vmSession.Machine.SaveSettings(); vmSession.Machine.AttachDevice(controller.Name, port, dev, DeviceType.DeviceType_HardDisk, rosHdd); vmSession.Machine.SaveSettings(); }
/// <summary> /// Initializes a new instance of the <see cref="ParseConfigController"/> class. /// </summary> public AVConfigController(IAVCommandRunner commandRunner, IStorageController storageController) { this.commandRunner = commandRunner; CurrentConfigController = new AVCurrentConfigController(storageController); }
private void EmptyHardDisk(Session vmSession) { IProgress progress; IStorageController controller = null; uint inst; IMedium rosHdd = null; int dev = 0, port; Boolean HddFound = false; /* Go through storage controllers to find IDE/SATA one */ for (inst = 0; inst < 4; inst++) { try { controller = rosVM.GetStorageControllerByInstance(inst); if (controller.Bus == StorageBus.StorageBus_IDE || controller.Bus == StorageBus.StorageBus_SATA) { break; } } catch (Exception exc) { /* Just skip it */ } } /* Now check what HDD we have connected to this controller */ for (port = 0; port < controller.MaxPortCount; port++) { for (dev = 0; dev < controller.MaxDevicesPerPortCount; dev++) { try { rosHdd = rosVM.GetMedium(controller.Name, port, dev); if (rosHdd.DeviceType == DeviceType.DeviceType_HardDisk) { /* We found the one and only harddisk */ HddFound = true; break; } rosHdd.Close(); } catch (Exception exc) { /* Just skip it */ } } if (HddFound) { break; } } /* Delete the existing hdd */ if (HddFound) { try { controller = rosVM.GetStorageControllerByInstance(inst); vmSession.Machine.DetachDevice(controller.Name, port, dev); vmSession.Machine.SaveSettings(); progress = rosHdd.DeleteStorage(); progress.WaitForCompletion(-1); rosHdd.Close(); } catch (Exception exc) { Console.WriteLine("Could not delete existing HDD:" + exc); } } else { /* Connect to port 0, device 0 if there was no hdd found */ port = 0; dev = 0; } /* Create a new one */ CreateHardDisk(vmSession, controller, port, dev); }
public AVCurrentUserController(IStorageController storageController) { this.storageController = storageController; }
public InstallationIdController(IStorageController storageController) { this.storageController = storageController; }
public InstallationIdController(IStorageController storageController) => StorageController = storageController;
public ParseCurrentConfigController(IStorageController storageController) { StorageController = storageController; OperationQueue = new TaskQueue { }; }
/// <summary> /// Initialize book's collection and storage for it /// </summary> /// <param name="filePath"></param> /// <param name="storage"></param> public BookListService(string filePath, IStorageController <Book> storage) { Storage = storage; ListOfBooks = Storage.GetItems() as List <Book> ?? new List <Book>(); }
/// <summary> /// Initializes a new instance of the <see cref="Parse.Core.Internal.ParseCurrentConfigController"/> class. /// </summary> public AVCurrentConfigController(IStorageController storageController) { this.storageController = storageController; taskQueue = new TaskQueue(); }
public ParseCurrentUserController(IStorageController storageController) => StorageController = storageController;
public UnitListModel(IStorageController storageController) { _storageController = storageController; Models = new List<IUnitModel>(); }
/// <summary> /// Initializes a new instance of the <see cref="ParseConfigController"/> class. /// </summary> public ParseConfigController(IParseCommandRunner commandRunner, IStorageController storageController) { this.commandRunner = commandRunner; CurrentConfigController = new ParseCurrentConfigController(storageController); }
/// <summary> /// Initializes a new instance of the <see cref="Parse.Core.Internal.ParseCurrentConfigController"/> class. /// </summary> public ParseCurrentConfigController(IStorageController storageController) { this.storageController = storageController; taskQueue = new TaskQueue(); }
public AVCurrentInstallationController(IInstallationIdController installationIdController, IStorageController storageController, IAVInstallationCoder installationCoder) { this.installationIdController = installationIdController; this.storageController = storageController; this.installationCoder = installationCoder; }
public UnitListModel(IStorageController storageController) { _storageController = storageController; Models = new List <IUnitModel>(); }
public ParseCurrentUserController(IStorageController storageController) { this.storageController = storageController; }
public ReportProvider(IStorageController storageController) { _storageController = storageController; }
public ParseCurrentInstallationController(IInstallationIdController installationIdController, IStorageController storageController, IParseInstallationCoder installationCoder) { this.installationIdController = installationIdController; this.storageController = storageController; this.installationCoder = installationCoder; }
/// <summary> /// Create a new class instance. /// </summary> /// <param name="categoryController"><seealso cref="IStorageController{TModel}"/> with categories.</param> /// <param name="dataController"><seealso cref="IStorageController{TModel}"/> with data.</param> public StorageHandler(IStorageController <CategoryModel> categoryController, IStorageController <DataModel> dataController) { this.categoryController = categoryController; this.dataController = dataController; }