Ejemplo n.º 1
0
        public MenuBuilder(INiPackage package, string niMenu, Dictionary<string, object> resources)
        {
            if (package == null)
                throw new ArgumentNullException("package");
            if (niMenu == null)
                throw new ArgumentNullException("niMenu");
            if (resources == null)
                throw new ArgumentNullException("resources");

            _commandManager = (NiCommandManager)package.GetService(typeof(INiCommandManager));
            _menuManager = (INiMenuManager)package.GetService(typeof(INiMenuManager));
            _package = package;
            _niMenu = niMenu;
            _resources = resources;
        }
Ejemplo n.º 2
0
        public MenuBuilder(INiPackage package, string niMenu, Dictionary <string, object> resources)
        {
            if (package == null)
            {
                throw new ArgumentNullException("package");
            }
            if (niMenu == null)
            {
                throw new ArgumentNullException("niMenu");
            }
            if (resources == null)
            {
                throw new ArgumentNullException("resources");
            }

            _commandManager = (NiCommandManager)package.GetService(typeof(INiCommandManager));
            _menuManager    = (INiMenuManager)package.GetService(typeof(INiMenuManager));
            _package        = package;
            _niMenu         = niMenu;
            _resources      = resources;
        }
Ejemplo n.º 3
0
        public NiSettings(INiPackage package)
        {
            if (package == null)
                throw new ArgumentNullException("package");

            _package = package;

            var env = (INiEnv)package.GetService(typeof(INiEnv));

            _registryKey =
                env.RegistryRoot +
                "\\Configuration\\Packages\\" +
                package.GetType().GUID.ToString("B").ToUpperInvariant();
        }
Ejemplo n.º 4
0
        public NiSettings(INiPackage package)
        {
            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            _package = package;

            var env = (INiEnv)package.GetService(typeof(INiEnv));

            _registryKey =
                env.RegistryRoot +
                "\\Configuration\\Packages\\" +
                package.GetType().GUID.ToString("B").ToUpperInvariant();
        }
Ejemplo n.º 5
0
 public object GetService(Type serviceType)
 {
     return(_package.GetService(serviceType));
 }