Exemplo n.º 1
0
 /// <inheritdoc/>
 public void RegisterDirtiableDependency(IDirtiableViewModel dirtiable)
 {
     if (dependencies.Contains(dirtiable))
     {
         throw new ArgumentException(@"The given dirtiable object is already registered as a dependency.", nameof(dirtiable));
     }
     dependencies.Add(dirtiable);
     dirtiable.DirtinessUpdated += DependencyDirtinessUpdated;
 }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public void UnregisterDirtiableDependency(IDirtiableViewModel dirtiable)
        {
            dirtiable.DirtinessUpdated -= DependencyDirtinessUpdated;
            var removed = dependencies.Remove(dirtiable);

            if (!removed)
            {
                throw new ArgumentException(@"The given dirtiable object was not registered as a dependency.", nameof(dirtiable));
            }
        }
Exemplo n.º 3
0
        /// <inheritdoc/>
        public void UnregisterDirtiableDependency(IDirtiableViewModel dirtiable)
        {
            dirtiable.DirtinessChanged -= DependencyDirtinessChanged;
            bool removed = dependencies.Remove(dirtiable);

            if (!removed)
            {
                throw new ArgumentException(@"The given dirtiable object was not registered as a dependency.", "dirtiable");
            }
        }
 /// <inheritdoc/>
 public void UnregisterDirtiableDependency(IDirtiableViewModel dirtiable)
 {
     dirtiable.DirtinessUpdated -= DependencyDirtinessUpdated;
     var removed = dependencies.Remove(dirtiable);
     if (!removed) throw new ArgumentException(@"The given dirtiable object was not registered as a dependency.", nameof(dirtiable));
 }
 /// <inheritdoc/>
 public void RegisterDirtiableDependency(IDirtiableViewModel dirtiable)
 {
     if (dependencies.Contains(dirtiable)) throw new ArgumentException(@"The given dirtiable object is already registered as a dependency.", nameof(dirtiable));
     dependencies.Add(dirtiable);
     dirtiable.DirtinessUpdated += DependencyDirtinessUpdated;
 }