Ejemplo n.º 1
0
 // Autogenerated method
 //  public static final void writeXDPool(java.io.File, org.xdef.XDPool) throws java.io.IOException;
 /// <summary>
 /// Writes XDPool to given file.
 /// </summary>
 /// <param name="path">Filepath to write pool.</param>
 /// <param name="pool">Pool to write.</param>
 public void WriteXDPool(FilePath path, XDPool pool)
 {
     using (var builder = new BigEndianDataBuilder())
     {
         builder.Add(path).Add(pool.ObjectId);
         SendRequestWithResponse(new Request(FUNCTION_WRITEXDPOOL_2, builder.Build(), ObjectId));
     }
 }
Ejemplo n.º 2
0
        // Autogenerated method
        //  public static org.xdef.XDService createSQLService(java.sql.Connection) throws org.xdef.sys.SRuntimeException;

        /* TODO
         * public XDService CreateSQLService(Connection arg0)
         * {
         *  using (var builder = new BigEndianDataBuilder())
         *  {
         *      // Serialize args here
         *      var res = SendRequestWithResponse(new Request(FUNCTION_CREATESQLSERVICE_2, builder.Build(), ObjectId));
         *      using (var reader = res.Reader)
         *      {
         *          // Read response here
         *          throw new NotImplementedException();
         *      }
         *  }
         * }*/


        // Autogenerated method
        //  public static org.xdef.XDResultSet createXDResultSet(java.sql.ResultSet);

        /* TODO
         * public XDResultSet CreateXDResultSet(ResultSet arg0)
         * {
         *  using (var builder = new BigEndianDataBuilder())
         *  {
         *      // Serialize args here
         *      var res = SendRequestWithResponse(new Request(FUNCTION_CREATEXDRESULTSET_1, builder.Build(), ObjectId));
         *      using (var reader = res.Reader)
         *      {
         *          // Read response here
         *          throw new NotImplementedException();
         *      }
         *  }
         * }
         *
         *
         * // Autogenerated method
         * //  public static org.xdef.XDResultSet createXDResultSet(java.lang.String, java.sql.ResultSet);
         * public XDResultSet CreateXDResultSet(String arg0, ResultSet arg1)
         * {
         *  using (var builder = new BigEndianDataBuilder())
         *  {
         *      // Serialize args here
         *      var res = SendRequestWithResponse(new Request(FUNCTION_CREATEXDRESULTSET_2, builder.Build(), ObjectId));
         *      using (var reader = res.Reader)
         *      {
         *          // Read response here
         *          throw new NotImplementedException();
         *      }
         *  }
         * }
         *
         *
         * // Autogenerated method
         * //  public static org.xdef.XDXmlOutStream createXDXmlOutStream(java.io.Writer, java.lang.String, boolean);
         * public XDXmlOutStream CreateXDXmlOutStream(Writer arg0, String arg1, boolean arg2)
         * {
         *  using (var builder = new BigEndianDataBuilder())
         *  {
         *      // Serialize args here
         *      var res = SendRequestWithResponse(new Request(FUNCTION_CREATEXDXMLOUTSTREAM_1, builder.Build(), ObjectId));
         *      using (var reader = res.Reader)
         *      {
         *          // Read response here
         *          throw new NotImplementedException();
         *      }
         *  }
         * }
         *
         *
         * // Autogenerated method
         * //  public static org.xdef.XDXmlOutStream createXDXmlOutStream(java.lang.String, java.lang.String, boolean) throws java.io.IOException;
         * public XDXmlOutStream CreateXDXmlOutStream(String arg0, String arg1, boolean arg2)
         * {
         *  using (var builder = new BigEndianDataBuilder())
         *  {
         *      // Serialize args here
         *      var res = SendRequestWithResponse(new Request(FUNCTION_CREATEXDXMLOUTSTREAM_2, builder.Build(), ObjectId));
         *      using (var reader = res.Reader)
         *      {
         *          // Read response here
         *          throw new NotImplementedException();
         *      }
         *  }
         * }
         *
         *
         * // Autogenerated method
         * //  public static org.xdef.XDParseResult createParseResult(java.lang.String);
         * public XDParseResult CreateParseResult(String arg0)
         * {
         *  using (var builder = new BigEndianDataBuilder())
         *  {
         *      // Serialize args here
         *      var res = SendRequestWithResponse(new Request(FUNCTION_CREATEPARSERESULT, builder.Build(), ObjectId));
         *      using (var reader = res.Reader)
         *      {
         *          // Read response here
         *          throw new NotImplementedException();
         *      }
         *  }
         * }
         *
         *
         * // Autogenerated method
         * //  public static org.xdef.XDValue createXDValue(java.lang.Object);
         * public XDValue CreateXDValue(Object arg0)
         * {
         *  using (var builder = new BigEndianDataBuilder())
         *  {
         *      // Serialize args here
         *      var res = SendRequestWithResponse(new Request(FUNCTION_CREATEXDVALUE, builder.Build(), ObjectId));
         *      using (var reader = res.Reader)
         *      {
         *          // Read response here
         *          throw new NotImplementedException();
         *      }
         *  }
         * }*/


        // Autogenerated method
        //  public static final void writeXDPool(java.io.OutputStream, org.xdef.XDPool) throws java.io.IOException;
        /// <summary>
        /// Writes XDPool to provided stream.
        /// </summary>
        /// <param name="stream">Target stream.</param>
        /// <param name="pool">Pool to write</param>
        public void WriteXDPool(Stream stream, XDPool pool)
        {
            if (!stream.CanRead)
            {
                throw new ArgumentException("Cannot read from stream.");
            }
            using (var builder = new BigEndianDataBuilder())
            {
                var wrap = new RemoteStreamWrapper(_client, stream);
                builder.Add(_client.RegisterLocalObject(wrap));
                builder.Add(pool.ObjectId);
                SendRequestWithResponse(new Request(FUNCTION_WRITEXDPOOL_1, builder.Build(), ObjectId));
            }
        }
Ejemplo n.º 3
0
 // Autogenerated method
 //  public static final void writeXDPool(java.lang.String, org.xdef.XDPool) throws java.io.IOException;
 /// <summary>
 /// Writes XDPool to specified path.
 /// </summary>
 /// <param name="path">String path to file.</param>
 /// <param name="pool">Pool to write</param>
 public void WriteXDPool(string path, XDPool pool)
 {
     WriteXDPool(new FilePath(path), pool);
 }