public void Init() { this.fileSystemRepositoryManager = new FileSystemRepositoryManager(); this.fileSystemRepositoryManagerSettings = new FileSystemRepositoryManagerSettings(); this.fileSystemRepositoryManagerSettings.folderPath = Path.Combine(GlobalTestConstants.TemporaryTestDataPath, "Repositories"); this.fileSystemRepositoryManager.Settings = this.fileSystemRepositoryManagerSettings; Directory.CreateDirectory(this.fileSystemRepositoryManagerSettings.folderPath); }
/// <summary> /// Serializes all supported objects to file system. /// </summary> /// <param name="parameters">AsyncAction parameters (not used in this case)</param> private void SerializeAllObjects(object parameters) { var state = new SerializationOperationState { CancellationToken = new CancellationTokenSource() }; ctlAsyncLog.ProcessData.AllowUpdateThroughPersistentMedium = false; ctlAsyncLog.ProcessData.Data = state; state.Result = FileSystemRepositoryManager.StoreAll( logItem => ctlAsyncLog.AddLog(HTMLHelper.HTMLEncode(logItem.Message)), state.CancellationToken.Token); }