/// <summary>
        /// The current PluginExecutionContext and the parent context hierarchy of the plugin.
        /// </summary>
        public static IEnumerable <IPluginExecutionContext> GetContexts(this IPluginExecutionContext context)
        {
            yield return(context);

            foreach (var parent in context.GetParentContexts())
            {
                yield return(parent);
            }
        }