Exemple #1
0
 public IXmlCursor Select(
     CompiledXPath path,
     IXmlIncludedTypeMap includedTypes,
     IXmlNamespaceSource namespaces,
     CursorFlags flags
     )
 {
     return(flags.SupportsMutation()
       ? (IXmlCursor) new XPathMutableCursor(this, path, includedTypes, namespaces, flags)
       : (IXmlCursor) new XPathReadOnlyCursor(this, path, includedTypes, namespaces, flags));
 }
Exemple #2
0
 protected override void Realize()
 {
     if (HasCurrent)
     {
         return;
     }
     if (state != State.Empty)
     {
         throw Error.CursorNotInRealizableState();
     }
     if (!flags.SupportsMutation())
     {
         throw Error.CursorNotMutable();
     }
     Create(knownTypes.Default.ClrType);
     OnRealized();
 }