/// <summary>
        ///     Deletes all comments in this section and key/value pairs
        /// </summary>
        public void ClearComments()
        {
#pragma warning disable CS0618 // Typ oder Element ist veraltet
            LeadingComments.Clear();
#pragma warning restore CS0618 // Typ oder Element ist veraltet
#pragma warning disable CS0618 // Typ oder Element ist veraltet
            TrailingComments.Clear();
#pragma warning restore CS0618 // Typ oder Element ist veraltet
            Keys.ClearComments();
        }
示例#2
0
        /// <summary>
        ///     Deletes all comments in this section and key/value pairs
        /// </summary>
        public void ClearComments()
        {
#pragma warning disable CS0618 // Type or member is obsolete
            LeadingComments.Clear();
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning disable CS0618 // Type or member is obsolete
            TrailingComments.Clear();
#pragma warning restore CS0618 // Type or member is obsolete
            Keys.ClearComments();
        }
示例#3
0
        /// <summary>
        ///     Merges otherSection into this, adding new keys if they don't exists
        ///     or overwriting values if the key already exists.
        /// Comments get appended.
        /// </summary>
        /// <remarks>
        ///     Comments are also merged but they are always added, not overwritten.
        /// </remarks>
        /// <param name="toMergeSection"></param>
        public void Merge(SectionData toMergeSection)
        {
            foreach (var comment in toMergeSection.LeadingComments)
            {
                LeadingComments.Add(comment);
            }

            Keys.Merge(toMergeSection.Keys);

            foreach (var comment in toMergeSection.TrailingComments)
            {
                TrailingComments.Add(comment);
            }
        }
        /// <summary>
        ///     Merges otherSection into this, adding new keys if they don't exists
        ///     or overwriting values if the key already exists.
        ///     Comments get appended.
        /// </summary>
        /// <remarks>
        ///     Comments are also merged but they are always added, not overwritten.
        /// </remarks>
        /// <param name="toMergeSection"></param>
        public void Merge(SectionData toMergeSection)
        {
#pragma warning disable CS0618 // Typ oder Element ist veraltet
            foreach (var comment in toMergeSection.LeadingComments)
#pragma warning restore CS0618 // Typ oder Element ist veraltet
#pragma warning disable CS0618 // Typ oder Element ist veraltet
            {
                LeadingComments.Add(comment);
            }
#pragma warning restore CS0618 // Typ oder Element ist veraltet

            Keys.Merge(toMergeSection.Keys);

#pragma warning disable CS0618 // Typ oder Element ist veraltet
            foreach (var comment in toMergeSection.TrailingComments)
#pragma warning restore CS0618 // Typ oder Element ist veraltet
#pragma warning disable CS0618 // Typ oder Element ist veraltet
            {
                TrailingComments.Add(comment);
            }
#pragma warning restore CS0618 // Typ oder Element ist veraltet
        }
示例#5
0
        /// <summary>
        ///     Merges otherSection into this, adding new keys if they don't exists
        ///     or overwriting values if the key already exists.
        /// Comments get appended.
        /// </summary>
        /// <remarks>
        ///     Comments are also merged but they are always added, not overwritten.
        /// </remarks>
        /// <param name="toMergeSection"></param>
        public void Merge(SectionData toMergeSection)
        {
#pragma warning disable CS0618 // Type or member is obsolete
            foreach (var comment in toMergeSection.LeadingComments)
#pragma warning restore CS0618 // Type or member is obsolete
            {
#pragma warning disable CS0618 // Type or member is obsolete
                LeadingComments.Add(comment);
#pragma warning restore CS0618 // Type or member is obsolete
            }

            Keys.Merge(toMergeSection.Keys);

#pragma warning disable CS0618 // Type or member is obsolete
            foreach (var comment in toMergeSection.TrailingComments)
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning disable CS0618 // Type or member is obsolete
            {
                TrailingComments.Add(comment);
            }
#pragma warning restore CS0618 // Type or member is obsolete
        }
示例#6
0
 /// <summary>
 ///     Deletes all comments in this section and key/value pairs
 /// </summary>
 public void ClearComments()
 {
     LeadingComments.Clear();
     TrailingComments.Clear();
     Keys.ClearComments();
 }