public static T GetPropertyDefinition <T>(this PluginContainer pluginContainer, string propertyName, string attributeName)
        {
            IDictionary <string, object> propertyDefinitions = pluginContainer.GetPropertyDefinitions(propertyName);

            return(!string.IsNullOrEmpty(attributeName) && propertyDefinitions.ContainsKey(attributeName) && propertyDefinitions[attributeName] is T
                       ? (T)propertyDefinitions[attributeName]
                       : default(T));
        }
        public ValidationStateDictionary ValidatePlugin(PluginContainer pluginContainer)
        {
            IEnumerable <ExtendedProperty> extendedProperties = pluginContainer.GetPropertiesUsingDefaultValues();

            return(validatePluginPropertyValues(new PluginPropertiesInput(pluginContainer.Definitions, extendedProperties, name => pluginContainer.GetPropertyDefinitions(name), name => extendedProperties.First(ep => string.Compare(ep.Name, name, true) == 0).Value)));
        }