Example #1
0
        /// <summary>
        /// Performs the initial setup of the ToolbarExtensionManager.  This method
        /// must be called once before the Instance property can be used.
        /// </summary>
        /// <param name="_parentToolbar"></param>
        /// <param name="_scope"></param>
        public static void InitialSetup(ToolbarViewModel _parentToolbar, string _scope)
        {
            // Validate parameters
            if (_parentToolbar == null)
            {
                throw new System.ArgumentNullException("_parentToolPanel", "An invalid ToolPanelViewModel was provided");
            }

            if (string.IsNullOrEmpty(_scope))
            {
                throw new System.ArgumentNullException("_scope", "An invalid scope was provided");
            }

            lock (syncRoot)
            {
                // Ensure that this can only be called once
                if (instance == null)
                {
                    instance = new ToolbarExtensionManager(_parentToolbar, _scope);
                    ExtensionManager.ComposeParts(instance);
                }
            }
        }
Example #2
0
        /// <summary>
        /// Performs the initial setup of the ToolbarExtensionManager.  This method
        /// must be called once before the Instance property can be used.
        /// </summary>
        /// <param name="_parentToolbar"></param>
        /// <param name="_scope"></param>
        public static void InitialSetup(ToolbarViewModel _parentToolbar, string _scope)
        {
            // Validate parameters
            if (_parentToolbar == null)
                throw new System.ArgumentNullException("_parentToolPanel", "An invalid ToolPanelViewModel was provided");

            if (string.IsNullOrEmpty(_scope))
                throw new System.ArgumentNullException("_scope", "An invalid scope was provided");

            lock (syncRoot)
            {
                // Ensure that this can only be called once
                if (instance == null)
                {
                    instance = new ToolbarExtensionManager(_parentToolbar, _scope);
                    ExtensionManager.ComposeParts(instance);
                }
            }
        }