Exemplo n.º 1
0
        private bool ResolveDocumentWrapper(IntPtr txn, IntPtr mgr, string uri, IntPtr val)
        {
            bool flag;

            using (Transaction transaction = (txn == IntPtr.Zero) ? null : Transaction.Create(new XmlTransaction(txn, false)))
            {
                using (Manager manager = (mgr == IntPtr.Zero) ? null : new Manager(new XmlManager(mgr, false)))
                {
                    using (Document document = this.ResolveDocument(transaction, manager, uri))
                    {
                        if (document == null)
                        {
                            flag = false;
                        }
                        else
                        {
                            using (Value value2 = new Value(document))
                            {
                                using (XmlValue value3 = (val == IntPtr.Zero) ? null : new XmlValue(val, false))
                                {
                                    XmlValue.setValue(value3, Value.ToInternal(value2));
                                    flag = true;
                                }
                            }
                        }
                    }
                }
            }
            return(flag);
        }
Exemplo n.º 2
0
 public override bool Equals(object o)
 {
     if (o is Value)
     {
         using (XmlValue value2 = this.CreateXmlValue())
         {
             return(value2.equals(Value.ToInternal((Value)o)));
         }
     }
     if (o is NodeImpl)
     {
         using (XmlValue value3 = this.CreateXmlValue())
         {
             return(value3.equals(((NodeImpl)o).Internal));
         }
     }
     if (o is Node)
     {
         using (XmlValue value4 = this.CreateXmlValue())
         {
             using (XmlValue value5 = Node.CreateXmlValue((Node)o))
             {
                 return(value4.equals(value5));
             }
         }
     }
     return(false);
 }
Exemplo n.º 3
0
        private bool ResolveCollectionWrapper(IntPtr txn, IntPtr mgr, string uri, IntPtr res)
        {
            bool flag;

            using (Transaction transaction = (txn == IntPtr.Zero) ? null : Transaction.Create(new XmlTransaction(txn, false)))
            {
                using (Manager manager = (mgr == IntPtr.Zero) ? null : new Manager(new XmlManager(mgr, false)))
                {
                    using (Results results = this.ResolveCollection(transaction, manager, uri))
                    {
                        if (results == null)
                        {
                            flag = false;
                        }
                        else
                        {
                            using (XmlResults results2 = (res == IntPtr.Zero) ? null : new XmlResults(res, false))
                            {
                                results.Reset();
                                while (results.MoveNext())
                                {
                                    results2.add(Value.ToInternal(results.Current));
                                }
                                flag = true;
                            }
                        }
                    }
                }
            }
            return(flag);
        }
Exemplo n.º 4
0
 public void SetMetaData(MetaData md)
 {
     this.doc_.setMetaData(md.URI, md.Name, Value.ToInternal(md.Value));
 }
Exemplo n.º 5
0
 public void Add(Value v)
 {
     this.r_.add(Value.ToInternal(v));
 }
Exemplo n.º 6
0
 public void SetVariableValue(string name, Value value)
 {
     this.qc_.setVariableValue(name, Value.ToInternal(value));
 }
Exemplo n.º 7
0
 public Statistics LookupStatistics(Transaction txn, IndexSpecification.Entry entry, string parent_uri, string parent_name, Value value)
 {
     return(Statistics.Create(this.cont_.lookupStatistics(Transaction.ToInternal(txn), entry.URI, entry.Name, parent_uri, parent_name, entry.Index, Value.ToInternal(value))));
 }
Exemplo n.º 8
0
 public Results LookupIndex(Transaction txn, QueryContext context, IndexSpecification.Entry entry, string parent_uri, string parent_name, Value value, DocumentConfig config)
 {
     return(Results.Create(this.cont_.lookupIndex(Transaction.ToInternal(txn), QueryContext.ToInternal(context), entry.URI, entry.Name, parent_uri, parent_name, entry.Index, Value.ToInternal(value), config.Flags)));
 }
Exemplo n.º 9
0
 public Results Execute(Transaction txn, Value contextItem, QueryContext context, DocumentConfig config)
 {
     return(Results.Create(this.qe_.execute(Transaction.ToInternal(txn), Value.ToInternal(contextItem), QueryContext.ToInternal(context), config.Flags)));
 }
Exemplo n.º 10
0
 public int Execute(Transaction txn, Value toModify, QueryContext context, UpdateContext uc)
 {
     return((int)this.mod_.execute(Transaction.ToInternal(txn), Value.ToInternal(toModify), QueryContext.ToInternal(context), UpdateContext.ToInternal(uc)));
 }