Kudu.Core.Deployment.DeploymentStatusFile.GetOptionalElementValue C# (CSharp) Method

GetOptionalElementValue() private static method

private static GetOptionalElementValue ( System.Xml.Linq.XElement element, string localName, string namespaceName = null ) : string
element System.Xml.Linq.XElement
localName string
namespaceName string
return string
        private static string GetOptionalElementValue(XElement element, string localName, string namespaceName = null)
        {
            XElement child;
            if (String.IsNullOrEmpty(namespaceName))
            {
                child = element.Element(localName);
            }
            else
            {
                child = element.Element(XName.Get(localName, namespaceName));
            }
            return child != null ? child.Value : null;
        }