diff --git a/README.md b/README.md index 7142a20c..1c2bdd40 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ comments are written before the element they refer to. To query, add or remove comments, access the property `Comments` available both in `SectionData` and `KeyData` models. ```csharp -var listOfCommentsForSection = config.["user_settings"].Comments; +var listOfCommentsForSection = config["user_settings"].Comments; var listOfCommentsForKey = config["user_settings"].GetKeyData("resolution").Comments; ``` diff --git a/src/IniParser.Example/Program.cs b/src/IniParser.Example/Program.cs index 1cec3824..252c53c9 100644 --- a/src/IniParser.Example/Program.cs +++ b/src/IniParser.Example/Program.cs @@ -13,7 +13,7 @@ public static void Main() #Update rate in msecs setUpdate = 100 -#Maximun errors before quit +#Maximum errors before quit setMaxErrors = 2 #Users allowed to access the system diff --git a/src/IniParser.Example/TestIniFile.ini b/src/IniParser.Example/TestIniFile.ini index 6b1b5dbf..7f25c3db 100644 --- a/src/IniParser.Example/TestIniFile.ini +++ b/src/IniParser.Example/TestIniFile.ini @@ -4,7 +4,7 @@ #Update rate in msecs setUpdate = 100 -#Maximun errors before quit +#Maximum errors before quit setMaxErrors = 2 #Users allowed to access the system diff --git a/src/IniParser.Tests/Unit/Model/SectionCollectionTests.cs b/src/IniParser.Tests/Unit/Model/SectionCollectionTests.cs index bcd095c2..b9772842 100644 --- a/src/IniParser.Tests/Unit/Model/SectionCollectionTests.cs +++ b/src/IniParser.Tests/Unit/Model/SectionCollectionTests.cs @@ -20,7 +20,7 @@ public void check_section_data_operations() SectionCollection sdc = new SectionCollection(); Assert.That(sdc, Is.Empty); - //Add sectoin + //Add section sdc.Add(strSectionTest); sdc.Add(strSectionTest); Assert.That(sdc.Count, Is.EqualTo(1)); @@ -31,7 +31,7 @@ public void check_section_data_operations() Assert.That(sdc.FindByName(strSectionTest).Comments, Is.Empty); Assert.That(sdc.FindByName(strSectionTest).Properties.Count, Is.EqualTo(0)); - //Check add coments + //Check add comments sdc.FindByName(strSectionTest).Comments.Add(strComment); Assert.That(sdc.FindByName(strSectionTest).Comments.Count, Is.EqualTo(1)); sdc.FindByName(strSectionTest).Comments.Clear(); diff --git a/src/IniParser.Tests/Unit/Parser/ParserTests.cs b/src/IniParser.Tests/Unit/Parser/ParserTests.cs index b625d7cf..8645396b 100644 --- a/src/IniParser.Tests/Unit/Parser/ParserTests.cs +++ b/src/IniParser.Tests/Unit/Parser/ParserTests.cs @@ -226,7 +226,7 @@ public void check_can_parse_special_characters_in_section_names() public void allow_whitespace_in_section_names() { string data = - @"[Web Colaboration] + @"[Web Collaboration] key = value"; var parser = new IniDataParser(); @@ -234,9 +234,9 @@ public void allow_whitespace_in_section_names() IniData iniData = parser.Parse(data); Assert.That(iniData.Sections.Count, Is.EqualTo(1)); - Assert.That(iniData.Sections.Contains("Web Colaboration"), Is.True); - Assert.That(iniData.Sections["Web Colaboration"].Contains("key"), Is.True); - Assert.That(iniData.Sections["Web Colaboration"]["key"], Is.EqualTo("value")); + Assert.That(iniData.Sections.Contains("Web Collaboration"), Is.True); + Assert.That(iniData.Sections["Web Collaboration"].Contains("key"), Is.True); + Assert.That(iniData.Sections["Web Collaboration"]["key"], Is.EqualTo("value")); } [Test] diff --git a/src/IniParser/Configuration/IniParserConfiguration.cs b/src/IniParser/Configuration/IniParserConfiguration.cs index ac597d7d..14cba83c 100644 --- a/src/IniParser/Configuration/IniParserConfiguration.cs +++ b/src/IniParser/Configuration/IniParserConfiguration.cs @@ -8,9 +8,9 @@ namespace IniParser.Configuration /// With a configuration object you can redefine how the parser /// will detect special items in the ini file by defining new regex /// (e.g. you can redefine the comment regex so it just treat text as - /// a comment iff the comment caracter is the first in the line) + /// a comment iff the comment character is the first in the line) /// or changing the set of characters used to define elements in - /// the ini file (e.g. change the 'comment' caracter from ';' to '#') + /// the ini file (e.g. change the 'comment' character from ';' to '#') /// You can also define how the parser should treat errors, or how liberal /// or conservative should it be when parsing files with "strange" formats. public class IniParserConfiguration : IDeepCloneable @@ -51,7 +51,7 @@ public IniParserConfiguration() public bool CaseInsensitive { get; set; } = false; /// - /// Allows having keys at the begining of the file, before any section + /// Allows having keys at the beginning of the file, before any section /// is defined. Those keys don't belong to any section and are stored in /// the special field. /// If set to false and the ini file contains keys outside a section, diff --git a/src/IniParser/Configuration/IniScheme.cs b/src/IniParser/Configuration/IniScheme.cs index fe08ce83..2f11231f 100644 --- a/src/IniParser/Configuration/IniScheme.cs +++ b/src/IniParser/Configuration/IniScheme.cs @@ -13,7 +13,7 @@ public class IniScheme : IDeepCloneable /// Ctor. /// /// - /// By default the various delimiters for the data are setted: + /// By default the various delimiters for the data are set: /// ';' for one-line comments /// '[' ']' for delimiting a section /// '=' for linking key / value pairs @@ -51,7 +51,7 @@ public IniScheme() /// /// Sets the string that defines the start of a comment. - /// A comment spans from the mirst matching comment string + /// A comment spans from the first matching comment string /// to the end of the line. /// /// @@ -93,7 +93,7 @@ public string SectionEndString /// - /// Sets the string used in the ini file to denote a key / value assigment + /// Sets the string used in the ini file to denote a key / value assignment /// /// /// Defaults to character '=' diff --git a/src/IniParser/Exceptions/ParsingException.cs b/src/IniParser/Exceptions/ParsingException.cs index 36647c3a..91cda6ef 100644 --- a/src/IniParser/Exceptions/ParsingException.cs +++ b/src/IniParser/Exceptions/ParsingException.cs @@ -3,7 +3,7 @@ namespace IniParser.Exceptions { /// - /// Represents an error ococcurred while parsing data + /// Represents an error occurred while parsing data /// public class ParsingException : Exception { diff --git a/src/IniParser/IniData.cs b/src/IniParser/IniData.cs index 57a111ad..b72a670c 100644 --- a/src/IniParser/IniData.cs +++ b/src/IniParser/IniData.cs @@ -21,7 +21,7 @@ public IniData() } /// - /// Initialzes an IniData instance with a given scheme + /// Initializes an IniData instance with a given scheme /// /// public IniData(IniScheme scheme) @@ -40,7 +40,7 @@ public IniData(IniData ori) /// /// If set to true, it will automatically create a section when you use the indexed - /// access with a section name that does not exis. + /// access with a section name that does not exist. /// If set to false, it will throw an exception if you try to access a section that /// does not exist with the index operator. /// diff --git a/src/IniParser/IniDataParser.cs b/src/IniParser/IniDataParser.cs index 63a0e22a..7ca7a25f 100644 --- a/src/IniParser/IniDataParser.cs +++ b/src/IniParser/IniDataParser.cs @@ -11,9 +11,9 @@ namespace IniParser { /// - /// Responsible for parsing an string from an ini file, and creating - /// an structure. - /// + /// Responsible for parsing an string from an ini file, and creating + /// an structure. + /// public partial class IniDataParser { #region Initialization @@ -73,10 +73,10 @@ public IniData Parse(string iniString) /// Parses a string containing valid ini data /// /// - /// Text reader for the source string contaninig the ini data + /// Text reader for the source string containing the ini data /// /// - /// An instance containing the data readed + /// An instance containing the data read /// from the source /// /// @@ -97,10 +97,10 @@ public IniData Parse(TextReader textReader) /// Parses a string containing valid ini data /// /// - /// Text reader for the source string contaninig the ini data + /// Text reader for the source string containing the ini data /// /// - /// An instance containing the data readed + /// An instance containing the data read /// from the source /// /// @@ -142,7 +142,7 @@ public void Parse(TextReader textReader, ref IniData iniData) // TODO: is this try necessary? try { - // Orphan comments, assing to last section/key value + // Orphan comments, assign to last section/key value if (Configuration.ParseComments && CurrentCommentListTemp.Count > 0) { if (iniData.Sections.Count > 0) @@ -242,7 +242,7 @@ protected virtual bool ProcessComment(StringBuffer currentLine) currentLineTrimmed.TrimEnd(); var commentRange = currentLineTrimmed.FindSubstring(Scheme.CommentString); - // Exctract the range of the string that contains the comment but not + // Extract the range of the string that contains the comment but not // the comment delimiter var startIdx = commentRange.start + Scheme.CommentString.Length; var size = currentLineTrimmed.Count - Scheme.CommentString.Length; @@ -260,7 +260,7 @@ protected virtual bool ProcessComment(StringBuffer currentLine) } /// - /// Proccess a string which contains an ini section.% + /// Process a string which contains an ini section.% /// /// /// The string to be processed @@ -482,7 +482,7 @@ private void AddKeyToKeyValueCollection(string key, string value, PropertyCollec #region Fields uint _currentLineNumber; - // Holds a list of the exceptions catched while parsing + // Holds a list of the exceptions caught while parsing readonly List _errorExceptions; // Temp list of comments @@ -505,7 +505,7 @@ internal set } List _currentCommentListTemp; - // Tmp var with the name of the seccion which is being process + // Temporary var with the name of the section which is being process string _currentSectionNameTemp; // Buffer used to hold the current line being processed. diff --git a/src/IniParser/Model/IDeepCloneable.cs b/src/IniParser/Model/IDeepCloneable.cs index 79a1efbf..8b2bf78f 100644 --- a/src/IniParser/Model/IDeepCloneable.cs +++ b/src/IniParser/Model/IDeepCloneable.cs @@ -5,7 +5,7 @@ /// copied too instead of copying the reference. /// /// - public interface IDeepCloneable where T : class + public interface IDeepCloneable where T : class { T DeepClone(); } diff --git a/src/IniParser/Model/Property.cs b/src/IniParser/Model/Property.cs index 3b308a80..462779fd 100644 --- a/src/IniParser/Model/Property.cs +++ b/src/IniParser/Model/Property.cs @@ -48,7 +48,7 @@ public Property(Property ori) /// /// Gets or sets the comment list associated to this property. - /// Makes a copy og the values when set + /// Makes a copy of the values when set /// public List Comments { diff --git a/src/IniParser/Model/PropertyCollection.cs b/src/IniParser/Model/PropertyCollection.cs index d86622c7..e68f7b56 100644 --- a/src/IniParser/Model/PropertyCollection.cs +++ b/src/IniParser/Model/PropertyCollection.cs @@ -64,7 +64,7 @@ public PropertyCollection(PropertyCollection ori, IEqualityComparer sear /// /// /// If we try to assign the value of a property which doesn't exists, - /// a new one is added with the kay and the value specified + /// a new one is added with the key and the value specified /// /// /// key of the property @@ -182,7 +182,7 @@ public void ClearComments() /// Key name to search /// /// - /// true if a property with the givne exists in the collectoin + /// true if a property with the given exists in the collection /// false otherwise /// public bool Contains(string keyName) @@ -248,7 +248,7 @@ public bool Remove(string keyName) #region IEnumerable Members /// - /// Allows iteration througt the collection. + /// Allows iteration through the collection. /// /// A strong-typed IEnumerator public IEnumerator GetEnumerator()