public PropertyChangedEventArgs(Properties properties, string key, object oldValue, object newValue) { Properties = properties; Key = key; OldValue = oldValue; NewValue = newValue; }
public static PlugInReference Create(Properties properties, string hintPath) { PlugInReference reference = new PlugInReference(properties["addin"]); string version = properties["version"]; if (version != null && version.Length > 0) { int pos = version.IndexOf('-'); if (pos > 0) { reference.MinimumVersion = ParseVersion(version.Substring(0, pos), hintPath); reference.MaximumVersion = ParseVersion(version.Substring(pos + 1), hintPath); } else { reference.MaximumVersion = reference.MinimumVersion = ParseVersion(version, hintPath); } } reference.RequirePreload = string.Equals(properties["requirePreload"], "true", StringComparison.OrdinalIgnoreCase); return reference; }
public static Properties ReadFromAttributes(XmlReader reader) { Properties properties = new Properties(); if (reader.HasAttributes) { for (int i = 0; i < reader.AttributeCount; i++) { reader.MoveToAttribute(i); properties[reader.Name] = reader.Value; } reader.MoveToElement(); //Moves the reader back to the element node. } return properties; }