BO4E/BO/BusinessObject.cs
/// <summary>
///     Get a dictionary containing the key values of this Business Object.
///     The dictionary has the JsonPropertyAttribute.PropertyName or FieldName
///     of the key as key and the actual key value as value.
/// </summary>
/// <seealso cref="GetBoKeyProps(Type)" />
/// <returns>A dictionary with key value pairs.</returns>
Get a dictionary containing the key values of this Business Object.
The dictionary has the JsonPropertyAttribute.PropertyName or FieldName
of the key as key and the actual key value as value.
Get a dictionary containing the key values of this Business Object . The dictionary has the JsonPropertyAttribute . PropertyName or FieldName of the key as key and the actual key value as value .
public Dictionary<string, object> GetBoKeys()
        {
            var result = new Dictionary<string, object>();
            foreach (var pi in GetBoKeyProps(GetType()))
            {
                var jpa = pi.GetCustomAttribute<JsonPropertyAttribute>();
                result.Add(jpa?.PropertyName != null ? jpa.PropertyName : pi.Name, pi.GetValue(this));
            }
            return result;
        }
public Dictionary < string , object > GetBoKeys ( ) { var result = new Dictionary < string , object > ( ) ; foreach ( var pi in GetBoKeyProps ( GetType ( ) ) ) { var jpa = pi . GetCustomAttribute < JsonPropertyAttribute > ( ) ; result . Add ( jpa ? . PropertyName != null ? jpa . PropertyName : pi . Name , pi . GetValue ( this ) ) ; } return result ; }
Get a dictionary containing the key values of this Business Object.
Get a dictionary containing the key values of this Business Object .
A dictionary with key value pairs.
A dictionary with key value pairs .
seealso
None