public static Nullable <T> AttributeNullableValue <T>(this XElement @this, XName name) where T : struct { var attribute = @this.Attribute(name); return(XConvert.ToNullable <T>(attribute.Value)); }
public static T AttributeValueOrDefault <T>(this XElement @this, XName name, T defaultValue = default) where T : struct { var attribute = @this.Attribute(name); return(XConvert.ToOrDefault <T>(attribute.Value)); }