internal static IEnumerable <PropertyValuePair> GetPropertiesToPropagateByPropertyName( this MessageProperties messageProperties, IEnumerable <XmlQualifiedName> propertyNames) { foreach (var name in propertyNames) { if (messageProperties.TryGetProperty(name, out var value)) { yield return(new(name, value)); } } }
public static string GetProperty <T>(this MessageProperties properties, MessageContextProperty <T, string> property) where T : MessageContextPropertyBase, new() { return(properties.TryGetProperty(property, out var value) ? value : default);