// Autogenerated method // public static org.xdef.XDBuilder getXDBuilder(java.util.Properties); /// <summary>Creates instance of XDBuilder with properties.</summary> /// <param name="props"> /// Properties or null - /// see /// <see cref="XDConstants"/> /// . /// </param> /// <returns>created XDBuilder.</returns> public XDBuilder GetXDBuilder(Utils.Properties props) { using (var builder = new BigEndianDataBuilder()) { builder.Add(props); var res = SendRequestWithResponse(new Request(FUNCTION_GETXDBUILDER_1, builder.Build(), ObjectId)); using (var reader = res.Reader) { return(new XDBuilder(reader.ReadInt32(), _client)); } } }
// Autogenerated method // public static org.xdef.XDPool compileXD(java.util.Properties, java.lang.Object...) throws org.xdef.sys.SRuntimeException; /// <summary>Compile XDPool from source.</summary> /// <param name="props">Properties or <tt>null</tt>.</param> /// <param name="parameters">list of sources, source pairs or external classes.</param> /// <returns>generated XDPool.</returns> /// <exception cref="RemoteCallException">if an error occurs.</exception> public XDPool CompileXD(Utils.Properties props, params object[] parameters) { using (var builder = new BigEndianDataBuilder()) { builder.Add(props); SerializeObjectSources(builder, parameters); var res = SendRequestWithResponse(new Request(FUNCTION_COMPILEXD_6, builder.Build(), ObjectId)); using (var reader = res.Reader) { return(new XDPool(reader.ReadInt32(), _client)); } } }
// Autogenerated method // public static org.xdef.XDPool compileXD(java.util.Properties, java.io.File[]) throws org.xdef.sys.SRuntimeException; /// <summary>Compile XDPool from InputStreams.</summary> /// <param name="props">Properties or <tt>null</tt>.</param> /// <param name="parameters">list of files with X-definition sources.</param> /// <returns>generated XDPool.</returns> /// <exception cref="RemoteCallException">if an error occurs.</exception> public XDPool CompileXD(Utils.Properties props, params FilePath[] parameters) { using (var builder = new BigEndianDataBuilder()) { builder.Add(props); builder.Add(parameters.Count()); foreach (var it in parameters) { builder.Add(it.JavaPath); } var res = SendRequestWithResponse(new Request(FUNCTION_COMPILEXD_3, builder.Build(), ObjectId)); using (var reader = res.Reader) { return(new XDPool(reader.ReadInt32(), _client)); } } }
// Autogenerated method // public static org.xdef.XDPool compileXD(java.util.Properties, java.lang.Object[], java.lang.String[]) throws org.xdef.sys.SRuntimeException; /// <summary>Compile XDPool from sources and assign the sourceId to each source.</summary> /// <param name="props">Properties or <tt>null</tt>.</param> /// <param name="sources"> /// array with source data with X-definitions source data. /// (The type of items can only be either the InputStreams or the String /// containing an XML document). /// </param> /// <param name="sourceIds"> /// array with sourceIds (corresponding to the items /// in the argument sources). /// </param> /// <returns>generated XDPool.</returns> /// <exception cref="RemoteCallException">if an error occurs.</exception> public XDPool CompileXD(Utils.Properties props, IEnumerable <object> sources, IEnumerable <string> sourceIds) { if (sources.Count() != sourceIds.Count()) { throw new ArgumentException("Object and sourceNames count mismatch."); } using (var builder = new BigEndianDataBuilder()) { builder.Add(props); SerializeObjectSources(builder, sources); builder.Add(sourceIds.Count()); foreach (var it in sourceIds) { builder.Add(it); } var res = SendRequestWithResponse(new Request(FUNCTION_COMPILEXD_5, builder.Build(), ObjectId)); using (var reader = res.Reader) { return(new XDPool(reader.ReadInt32(), _client)); } } }
// Autogenerated method // public static org.xdef.XDPool compileXD(java.util.Properties, java.io.InputStream[]) throws org.xdef.sys.SRuntimeException; /// <summary>Compile XDPool from InputStreams.</summary> /// <param name="props">Properties or <tt>null</tt>.</param> /// <param name="parameters">list of files with X-definition sources.</param> /// <returns>generated XDPool.</returns> /// <exception cref="RemoteCallException">if an error occurs.</exception> public XDPool CompileXD(Utils.Properties props, params Stream[] parameters) { if (parameters.Any(p => !p.CanRead)) { throw new ArgumentException("Input stream is not readable"); } using (var builder = new BigEndianDataBuilder()) { builder.Add(props); builder.Add(parameters.Count()); foreach (var it in parameters) { var wrap = new RemoteStreamWrapper(_client, it); builder.Add(_client.RegisterLocalObject(wrap)); } var res = SendRequestWithResponse(new Request(FUNCTION_COMPILEXD_4, builder.Build(), ObjectId)); using (var reader = res.Reader) { return(new XDPool(reader.ReadInt32(), _client)); } } }