/// <exclude /> public static LeafDisplayMode ParseDisplayMode(XAttribute attribute, Tree tree) { if (attribute != null) { LeafDisplayMode parsedValue; if (Enum.TryParse(attribute.Value, out parsedValue)) { return parsedValue; } tree.AddValidationError(attribute.GetXPath(), "TreeValidationError.Common.WrongAttributeValue", attribute.Value); } return LeafDisplayMode.Lazy; }