Ejemplo n.º 1
0
        public PropertyChangedEventArgs(Properties properties, string key, object oldValue, object newValue)
        {
            Properties = properties;

            Key = key;

            OldValue = oldValue;

            NewValue = newValue;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 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;
 }