diff --git a/src/NwRfcNet/RfcConnection.cs b/src/NwRfcNet/RfcConnection.cs index 7b0f81d..5403928 100644 --- a/src/NwRfcNet/RfcConnection.cs +++ b/src/NwRfcNet/RfcConnection.cs @@ -2,7 +2,7 @@ using NwRfcNet.TypeMapper; using System; -namespace NwRfcNet +namespace NwRfcNet { /// /// Represents a connection to a RFC server. @@ -35,9 +35,12 @@ public RfcConnection() { } public RfcConnection(string userName = null, string password = null, string hostname = null, + string messageServerHostname = null, string client = null, string language = null, string systemNumber = null, + string systemId = null, + string group = null, string sapRouter = null, string sncQop = null, string sncMyname = null, @@ -48,9 +51,12 @@ public RfcConnection(string userName = null, UserName = userName; Password = password; Hostname = hostname; + MessageServerHostname = messageServerHostname; Client = client; Language = language; SystemNumber = systemNumber; + SystemId = systemId; + Group = group; SapRouter = sapRouter; SncQop = sncQop; SncMyname = sncMyname; @@ -97,6 +103,16 @@ public string Hostname } } + public string MessageServerHostname + { + get => _parms.MessageServerHostname; + set + { + CheckConnectionIsClosed(); + _parms.MessageServerHostname = value; + } + } + public string Client { get => _parms.Client; @@ -127,6 +143,26 @@ public string Language } } + public string SystemId + { + get => _parms.SystemId; + set + { + CheckConnectionIsClosed(); + _parms.SystemId = value; + } + } + + public string Group + { + get => _parms.Group; + set + { + CheckConnectionIsClosed(); + _parms.Group = value; + } + } + public string SapRouter { get => _parms.SapRouter; diff --git a/src/NwRfcNet/RfcConnectionBuilder.cs b/src/NwRfcNet/RfcConnectionBuilder.cs index 785cf6e..35c4959 100644 --- a/src/NwRfcNet/RfcConnectionBuilder.cs +++ b/src/NwRfcNet/RfcConnectionBuilder.cs @@ -13,39 +13,48 @@ internal class RfcConnectionBuilder private static readonly IReadOnlyDictionary PropertyToRfcParam = typeof(RfcConnectionBuilder) .GetProperties() .Where(p => p.IsDefined(typeof(RfcConnectionPropertyAttribute), false)) - .ToDictionary( + .ToDictionary( key => key.Name, - prop => ((RfcConnectionPropertyAttribute[])prop .GetCustomAttributes(typeof(RfcConnectionPropertyAttribute), false)) + prop => ((RfcConnectionPropertyAttribute[])prop.GetCustomAttributes(typeof(RfcConnectionPropertyAttribute), false)) .First().RfcParamName); #region Properties [RfcConnectionPropertyAttribute("user")] - public string UserName { get ; set; } + public string UserName { get; set; } [RfcConnectionPropertyAttribute("passwd")] - public string Password { get ; set; } + public string Password { get; set; } [RfcConnectionPropertyAttribute("ASHOST")] - public string Hostname { get ; set; } - + public string Hostname { get; set; } + + [RfcConnectionPropertyAttribute("MSHOST")] + public string MessageServerHostname { get; set; } + [RfcConnectionPropertyAttribute("client")] - public string Client { get ; set; } + public string Client { get; set; } [RfcConnectionPropertyAttribute("sysnr")] - public string SystemNumber { get ; set; } + public string SystemNumber { get; set; } + + [RfcConnectionPropertyAttribute("R3NAME")] + public string SystemId { get; set; } + + [RfcConnectionPropertyAttribute("GROUP")] + public string Group { get; set; } [RfcConnectionPropertyAttribute("lang")] - public string Language { get ; set; } + public string Language { get; set; } [RfcConnectionPropertyAttribute("saprouter")] - public string SapRouter { get ; set; } + public string SapRouter { get; set; } [RfcConnectionPropertyAttribute("trace")] - public string Trace { get ; set; } + public string Trace { get; set; } [RfcConnectionPropertyAttribute("snc_qop")] - public string SncQop { get ; set; } + public string SncQop { get; set; } [RfcConnectionPropertyAttribute("snc_myname")] public string SncMyname { get; set; } @@ -74,7 +83,7 @@ internal RFC_CONNECTION_PARAMETER[] GetParms() .GetValue(this); if (rfcValue != null) - { + { rfcParams.Add(new RFC_CONNECTION_PARAMETER() { Name = prop.Value,