Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FixReferencesViewModel{T}"/> class.
 /// </summary>
 /// <param name="serviceProvider">The service provider for this view model.</param>
 /// <param name="dialog">The dialog shown to fix references. Can be null for unattended usage.</param>
 protected FixReferencesViewModel(IViewModelServiceProvider serviceProvider, IFixReferencesDialog dialog)
     : base(serviceProvider)
 {
     this.dialog         = dialog;
     CurrentReplacements = new ObservableList <ReferenceReplacementViewModel <T> >();
     PickupSingleReplacementObjectCommand = new AnonymousTaskCommand(serviceProvider, PickupSingleReplacementObject);
     FixReferencesCommand      = new AnonymousCommand(serviceProvider, () => FixReferences());
     ClearReferencesCommand    = new AnonymousCommand(serviceProvider, () => ClearReferences());
     ClearAllReferencesCommand = new AnonymousCommand(serviceProvider, ClearAllReferences);
 }
 public FixAssetReferencesViewModel([NotNull] IViewModelServiceProvider serviceProvider, [ItemNotNull, NotNull] IEnumerable <AssetViewModel> deletedObjects, [NotNull] IAssetDependencyManager dependencyManager, [NotNull] IFixReferencesDialog dialog)
     : base(serviceProvider, dialog)
 {
     if (dependencyManager == null)
     {
         throw new ArgumentNullException(nameof(dependencyManager));
     }
     this.dependencyManager = dependencyManager;
     hashIds = new HashSet <AssetId>();
     hashIds.AddRange(deletedObjects.Select(x => x.Id));
 }