Beispiel #1
0
 /// <summary>
 /// Returns the obsolete message for an element with the 'obsolete' attribute.
 /// </summary>
 /// <remarks>Use <see cref="IsObsolete"/> to determine if the element is obsolete.</remarks>
 public static string TryGetObsoleteMessage(this IServiceElementInfo element)
 {
     return(element.TryGetObsoleteAttribute()?.TryGetParameterValue("message"));
 }
Beispiel #2
0
 /// <summary>
 /// Returns true if the element has the 'obsolete' attribute.
 /// </summary>
 public static bool IsObsolete(this IServiceElementInfo element)
 {
     return(element.TryGetObsoleteAttribute() != null);
 }