private IEnumerable <Type> EnumerateContextTypes(ContextSupport contextSupport) { foreach (PluginContextAttribute pluginContextAttribute in this.pluginContextAttributes) { if ((pluginContextAttribute.ContextSupport & contextSupport) != 0) { yield return(pluginContextAttribute.ContextType); } } }
/// <summary> /// Initializes a new instance of the PluginContextAttribute class. /// </summary> /// <param name="contextType">Specifies the type of the contextual object that is supported by this Plugin.</param> /// <param name="contextSupport">Specifies the level of support for the specified contextual object type.</param> public PluginContextAttribute(Type contextType, ContextSupport contextSupport) { this.contextType = contextType; this.contextSupport = contextSupport; }