BoardGameGeekApiClient.Helpers.BoardGameGeekApiClientHelper.GetStringValue C# (CSharp) Method

GetStringValue() public static method

public static GetStringValue ( this element, string attribute = null, string defaultValue = "" ) : string
element this
attribute string
defaultValue string
return string
        public static string GetStringValue(this XElement element, string attribute = null, string defaultValue = "")
        {
            if (element == null)
                return defaultValue;

            if (string.IsNullOrEmpty(attribute))
                return element.Value;

            var xatt = element.Attribute(attribute);
            return xatt?.Value ?? defaultValue;
        }
        public static int? GetIntValue(this XElement element, string attribute = null, int? defaultValue = null)