コード例 #1
0
 public void Detach()
 {
     if (Attached)
     {
         Redirects.CollectionChanged += RedirectsCahnged;
         AttachedItems = Redirects.ToArray();
         foreach (var redirect in AttachedItems)
         {
             redirect.PropertyChanged += RedirectCahnged;
         }
         AttachedItems = null;
         Attached      = false;
     }
 }
コード例 #2
0
 public void Attach()
 {
     if (!Attached)
     {
         Attached = true;
         Redirects.CollectionChanged += RedirectsCahnged;
         AttachedItems = Redirects.ToArray();
         foreach (var redirect in AttachedItems)
         {
             redirect.PropertyChanged += RedirectCahnged;
         }
         IsDirty = false;
     }
 }