protected bool AddCultureIfRequired(XmlBehaviorAttribute beh) { bool ret = false; string c = beh.Culture; if (string.IsNullOrEmpty(c) == false) { cultureStack.Push(c); ret = true; } return(ret); }
private string GetAttributeName(string p, XmlBehaviorAttribute behavior) { string ret; if (behavior.XmlMapping != null) { ret = behavior.XmlMapping; } else { ret = char.ToLower(p[0]) + p.Substring(1); } return(ret); }
public static XmlBehaviorAttribute GetXmlBehavior(this System.Reflection.PropertyInfo property) { var attrs = property.GetCustomAttributes(false); XmlBehaviorAttribute ret = (XmlBehaviorAttribute) attrs.FirstOrDefault(i => i is XmlBehaviorAttribute); if (ret == null) { ret = new XmlBehaviorAttribute(); } else { ret.DoValidityTest(); } return(ret); }
protected XmlBehaviorAttribute GetXmlBehaviorOf(PropertyInfo item) { XmlBehaviorAttribute ret = item.GetXmlBehavior(); return(ret); }