private void LoadFromAttributes(LangDescription item, NanoXmlNode itemElement) { var properties = typeof(LangDescription).GetProperties(); /* loop through fields */ foreach (var property in properties) { if (property.PropertyType == typeof(string)) { var attr = itemElement.GetAttribute(property.Name); if (attr != null) { var val = TypeDescriptor.GetConverter(property.PropertyType).ConvertFromInvariantString(attr.Value); property.SetValue(item, val, null); } } } }
public NppKeywordApis(string value, LangDescription langDescription) : base(value, langDescription) { }
public NppKeyword(string value, LangDescription langDescription) { Value = value; Lang = langDescription; }