Example #1
0
            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);
                        }
                    }
                }
            }
Example #2
0
 public NppKeywordApis(string value, LangDescription langDescription) : base(value, langDescription)
 {
 }
Example #3
0
 public NppKeyword(string value, LangDescription langDescription)
 {
     Value = value;
     Lang  = langDescription;
 }