private ReferenceViewModel(IEventAggregator eventAggregator, IFileSystemService fileSystemService, IReferencingService referencingService, IWebService webService) { _eventAggregator = eventAggregator; _fileSystemService = fileSystemService; _referencingService = referencingService; _webService = webService; }
public ReferenceViewModel(IEventAggregator eventAggregator, IFileSystemService fileSystemService, IReferencingService referencingService, IWebService webService, ReferenceResult referenceResult, File referenceFile) : this(eventAggregator, fileSystemService, referencingService, webService) { ReferenceResult = referenceResult; _referenceFile = referenceFile; if (!referenceResult.IsComplete) { _referenceFile.References.Add(referenceResult.Reference); Task.Run(async() => { await _referencingService.CompleteReference(referenceResult.Reference); referenceResult.IsComplete = true; _fileSystemService.SaveFile(_referenceFile); }); } UpdateReferenceOnUrlChanges(); }
public ReferenceViewModel(IEventAggregator eventAggregator, IFileSystemService fileSystemService, IReferencingService referencingService, IWebService webService, Reference reference, File referenceFile) : this(eventAggregator, fileSystemService, referencingService, webService) { ReferenceResult = new ReferenceResult(reference, isComplete: true); _referenceFile = referenceFile; UpdateReferenceOnUrlChanges(); }