public bool Contains(PackagePart child)
 {
     // we can't call Children.Contains(child) here because that will only check by file name, not the actual instance
     return(Children.Any(p => p == child));
 }
 private void Attach(PackagePart child)
 {
     child.Parent = this;
     Children.Add(child);
 }
 /// <summary>
 /// Detach() is different from Remove() in that it doesn't dispose the child.
 /// </summary>
 /// <param name="child"></param>
 private void Detach(PackagePart child)
 {
     Children.Remove(child);
     child.Parent = null;
 }
示例#4
0
 private bool CanEditFileCommandExecute(PackagePart file)
 {
     return((file is PackageFile) &&
            !IsInEditFileMode &&
            !FileHelper.IsBinaryFile(file.Path));
 }