Exemplo n.º 1
0
        /// <summary>
        /// Adds an extension to be extended by the extension group.
        /// </summary>
        /// <typeparam name="T">The resource group that will be extending the target group.</typeparam>
        /// <param name="target">The name of the group being targeted.</param>
        /// <returns></returns>
        public ExtensionGroup AddExtension <T>(string target) where T : ResourceGroup
        {
            ExtensionGroupExtension extension = new ExtensionGroupExtension();

            extension.Target = target;

            extension.InsertAfter.Add(new ExtensionGroupInsertAfter
            {
                Reference = typeof(T)
            });

            Extensions.Add(extension);

            return(this);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds an extension to be extended by the extension group.
        /// </summary>
        /// <param name="target">The name of the resource group to be extended by this extension.</param>
        /// <param name="insertAfter">One or more group names that will be extending the target (groups will be included AFTER target is loaded).</param>
        /// <returns></returns>
        public ExtensionGroup AddExtension(string target, params string[] insertAfter)
        {
            ExtensionGroupExtension extension = new ExtensionGroupExtension();

            extension.Target = target;

            foreach (string insert in insertAfter)
            {
                extension.InsertAfter.Add(new ExtensionGroupInsertAfter
                {
                    InsertAfter = insert
                });
            }

            Extensions.Add(extension);

            return(this);
        }