示例#1
0
 internal KeyNameEnumerator(YSection owner)
 {
     _owner       = owner;
     _version     = owner._version;
     _index       = -1;
     _is_disposed = false;
 }
示例#2
0
        /// <summary>
        ///  指定されたリンク文字列からノードを取得します。
        /// </summary>
        /// <param name="link">リンク文字列です。</param>
        /// <returns>
        ///  指定されたリンク文字列からノードを取得できた場合はそのノードを表すオブジェクト、
        ///  それ以外の場合は<see langword="null"/>を返します。
        /// </returns>
        /// <exception cref="System.ArgumentNullException"/>
        public YNode?GetNodeByLink(string link)
        {
            link.EnsureNotNull(nameof(link));
            string[] names   = link.Split('.');
            YSection section = this;

            for (int i = 0; i < names.Length - 1; ++i)
            {
                var section2 = section.GetSection(names[i]);
                if (section2 is null)
                {
                    return(null);
                }
                else
                {
                    section = section2;
                }
            }
            return(null);
        }
示例#3
0
 internal KeyValueEnumerator(YSection owner)
 {
     _owner       = owner;
     _enumerator  = ((IReadOnlyDictionary <string, YNode>)(owner)).Keys.GetEnumerator();
     _is_disposed = false;
 }
示例#4
0
 internal KeyNameEnumerable(YSection owner)
 {
     _owner = owner;
 }