CombineName() 정적인 개인적인 메소드

static private CombineName ( RegistryKey rkey, string extra ) : string
rkey RegistryKey
extra string
리턴 string
예제 #1
0
        public RegistryKey Probe(RegistryKey rkey, string extra, bool writable)
        {
            RegistryKey registryKey    = null;
            Type        typeFromHandle = typeof(KeyHandler);
            RegistryKey result;

            lock (typeFromHandle)
            {
                string     text       = Path.Combine(this.Dir, extra);
                KeyHandler keyHandler = (KeyHandler)KeyHandler.dir_to_handler[text];
                if (keyHandler != null)
                {
                    registryKey = new RegistryKey(keyHandler, KeyHandler.CombineName(rkey, extra), writable);
                    KeyHandler.key_to_handler[registryKey] = keyHandler;
                }
                else if (Directory.Exists(text))
                {
                    keyHandler  = new KeyHandler(rkey, text);
                    registryKey = new RegistryKey(keyHandler, KeyHandler.CombineName(rkey, extra), writable);
                    KeyHandler.dir_to_handler[text]        = keyHandler;
                    KeyHandler.key_to_handler[registryKey] = keyHandler;
                }
                result = registryKey;
            }
            return(result);
        }
예제 #2
0
        public RegistryKey Ensure(RegistryKey rkey, string extra, bool writable)
        {
            Type        typeFromHandle = typeof(KeyHandler);
            RegistryKey result;

            lock (typeFromHandle)
            {
                string     text       = Path.Combine(this.Dir, extra);
                KeyHandler keyHandler = (KeyHandler)KeyHandler.dir_to_handler[text];
                if (keyHandler == null)
                {
                    keyHandler = new KeyHandler(rkey, text);
                }
                RegistryKey registryKey = new RegistryKey(keyHandler, KeyHandler.CombineName(rkey, extra), writable);
                KeyHandler.key_to_handler[registryKey] = keyHandler;
                KeyHandler.dir_to_handler[text]        = keyHandler;
                result = registryKey;
            }
            return(result);
        }