Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="nodePathInfo"></param>
        public RegistryEntry(IRegistryPathInfo nodePathInfo)
        {
            if (null == nodePathInfo)
            {
                throw new ArgumentNullException("pathInfo");
            }

            _nodePathInfo  = nodePathInfo;
            _childNodeName = new RegistryNodeName(nodePathInfo.NodeName);
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        public RegistryEntry()
        {
            _nodePathInfo = RegistryNodeHelpers.ExtractRegistryPathProvider(this);

            if (null == _nodePathInfo)
            {
                throw new ArgumentNullException("The definition of registry node could not be found.");
            }

            _childNodeName = new RegistryNodeName(_nodePathInfo.NodeName);
        }
Exemple #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pathInfo"></param>
        /// <param name="nodeName"></param>
        /// <returns></returns>
        public static IRegistryPathInfo Combine(IRegistryPathInfo pathInfo, RegistryNodeName nodeName)
        {
            if (null == pathInfo)
            {
                throw new ArgumentNullException("pathProvider");
            }

            if (null == nodeName || nodeName.IsEmpty)
            {
                throw new ArgumentNullException("nodeName");
            }

            return(new RegistryNodePath(pathInfo.RootType, string.Format(@"{0}\{1}", pathInfo.NodeName, nodeName)));
        }
Exemple #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="rootType"></param>
        /// <param name="nodeName"></param>
        /// <returns></returns>
        public static IRegistryPathInfo Parse(RegistryRootType rootType, RegistryNodeName nodeName)
        {
            if (null == nodeName || nodeName.IsEmpty)
            {
                throw new ArgumentNullException("nodeName");
            }

            if (nodeName.IsCompiled)
            {
                return(new RegistryNodePath(rootType, nodeName.ToString()));
            }

            return(null);
        }