コード例 #1
0
 public void IncrementDepth(IniAttributesManager attributes)
 {
     if (depth.Count != 0 && settings.EnableDepthSectionNaming)
     {
         char delimeter = (char)settings.DefaultObjectDelimiter;
         attributes.sectionName = String.Format("{2}{1}{0}", attributes.sectionName, delimeter, depth.Reverse().Aggregate((i, j) => i + delimeter + j));
     }
 }
コード例 #2
0
 public IniCollectionAttributesManager(IniAttributesManager attributes)
     : this(null, attributes)
 {
 }
コード例 #3
0
        public IniCollectionAttributesManager(MemberInfo member, IniAttributesManager attributes)
        {
            this.attributes = attributes;

            if (member != null)
            {
                this.arrayDelimiter = (IniArrayDelimiter)member.GetCustomAttributes(true).FirstOrDefault(x => x is IniArrayDelimiter);
                this.arrayField = (IniArrayField)member.GetCustomAttributes(true).FirstOrDefault(x => x is IniArrayField);
                this.arrayType = (IniArrayType)member.GetCustomAttributes(true).FirstOrDefault(x => x is IniArrayType);
                this.arrayMode = (arrayType == null) ? attributes.settings.DefaultArrayType : arrayType.type;
            }

            this.delimiter = (arrayDelimiter == null) ? (char)attributes.settings.DefaultArrayDelimiter : (char)arrayDelimiter.delimiter;
        }