示例#1
0
        private IntPtr ResolveSchemaWrapper(IntPtr txn, IntPtr mgr, string schemaLocation, string nameSpace)
        {
            IntPtr ptr;

            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 (InputStream stream = this.ResolveSchema(transaction, manager, schemaLocation, nameSpace))
                    {
                        if (stream == null)
                        {
                            return(IntPtr.Zero);
                        }
                        stream.Internal.disownCPtr();
                        ptr = XmlInputStream.getCPtr(stream.Internal);
                    }
                }
            }
            return(ptr);
        }
示例#2
0
        private IntPtr ResolveEntityWrapper(IntPtr txn, IntPtr mgr, string systemId, string publicId)
        {
            IntPtr ptr;

            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 (InputStream stream = this.ResolveEntity(transaction, manager, systemId, publicId))
                    {
                        if (stream == null)
                        {
                            return(IntPtr.Zero);
                        }
                        stream.Internal.disownCPtr();
                        ptr = XmlInputStream.getCPtr(stream.Internal);
                    }
                }
            }
            return(ptr);
        }
示例#3
0
文件: Manager.cs 项目: skitsanos/WDK9
 public Transaction CreateTransaction(TransactionConfig config)
 {
     return(Transaction.Create(this.mgr_.createTransaction(config.Flags)));
 }
示例#4
0
文件: Manager.cs 项目: skitsanos/WDK9
 public Transaction CreateTransaction()
 {
     return(Transaction.Create(this.mgr_.createTransaction()));
 }