示例#1
0
 public AccessPath GetParentPath()
 {
     if (MemberPath.Count < 1)
     {
         throw new InvalidOperationException("Cannot get the parent path of a path that does not contain any members.");
     }
     return(new AccessPath(VariableRoot)
     {
         MemberPath = MemberPath.Take(MemberPath.Count - 1).ToList()
     });
 }
 public InitializerPath GetParentPath()
 {
     if (MemberPath.Count < 1)
     {
         throw new InvalidOperationException("Cannot get the parent path of a path that does not contain any members.");
     }
     return(new InitializerPath(anchor)
     {
         MemberPath = MemberPath.Take(MemberPath.Count - 1).ToList()
     });
 }