Example #1
0
 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));
         }
     }
 }
Example #2
0
 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);