Exemplo n.º 1
0
        /// <summary>
        /// Calls OnRemove() on the DefaultExtension.
        /// </summary>
        public override void RemoveExtension(Extension extension)
        {
            DefaultExtension defaultExtension = extension as DefaultExtension;

            Debug.Assert(defaultExtension != null);
            defaultExtension.CallOnRemove();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates an instance of the DefaultExtension and calls OnInitialize on it.
        /// </summary>
        public override Extension CreateExtension(Type extensionType, DesignItem extendedItem)
        {
            DefaultExtension ext = (DefaultExtension)Activator.CreateInstance(extensionType);

            ext.InitializeDefaultExtension(extendedItem);
            return(ext);
        }