Beispiel #1
0
        /// <summary>
        /// Creates a new <see cref="RfcConnection"/> with parameters created using a <see cref="RfcConnectionParameterBuilder"/>.
        /// </summary>
        /// <param name="builder">The connection parameter builder.</param>
        public RfcConnection(RfcConnectionParameterBuilder builder)
        {
            if (builder is null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            options = builder.Build();
        }
Beispiel #2
0
        /// <summary>
        /// Creates a new <see cref="RfcConnection"/> with parameters created using a <see cref="RfcConnectionParameterBuilder"/>.
        /// </summary>
        /// <param name="builder">The connection parameter builder action.</param>
        public RfcConnection(Action <RfcConnectionParameterBuilder> builder)
        {
            if (builder is null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            var builderInstance = new RfcConnectionParameterBuilder();

            builder(builderInstance);
            options = builderInstance.Build();
        }