diff --git a/plist-cil/BinaryPropertyListParser.cs b/plist-cil/BinaryPropertyListParser.cs index da01580..766b2df 100644 --- a/plist-cil/BinaryPropertyListParser.cs +++ b/plist-cil/BinaryPropertyListParser.cs @@ -29,13 +29,14 @@ using System.IO; namespace Claunia.PropertyList { /// + /// /// Parses property lists that are in Apple's binary format. /// Use this class when you are sure about the format of the property list. /// Otherwise use the PropertyListParser class. - /// + /// /// Parsing is done by calling the static , /// and methods. - /// + /// /// /// @author Daniel Dreibrodt /// @author Natalia Portillo diff --git a/plist-cil/BinaryPropertyListWriter.cs b/plist-cil/BinaryPropertyListWriter.cs index 0d2c87e..df56360 100644 --- a/plist-cil/BinaryPropertyListWriter.cs +++ b/plist-cil/BinaryPropertyListWriter.cs @@ -29,10 +29,14 @@ using System.Collections.Generic; namespace Claunia.PropertyList { /// + /// /// A BinaryPropertyListWriter is a helper class for writing out - /// binary property list files. It contains an output stream and - /// various structures for keeping track of which NSObjects have - /// already been serialized, and where they were put in the file. + /// binary property list files. + /// + /// It contains an output stream and various structures for keeping track + /// of which NSObjects have already been serialized, and where they were + /// put in the file. + /// /// /// @author Keith Randall /// @author Natalia Portillo diff --git a/plist-cil/ChangeLog b/plist-cil/ChangeLog index b0e8067..970719b 100644 --- a/plist-cil/ChangeLog +++ b/plist-cil/ChangeLog @@ -1,3 +1,18 @@ +2015-02-20 Natalia Portillo + + * UID.cs: + * NSSet.cs: + * NSData.cs: + * NSArray.cs: + * NSString.cs: + * NSNumber.cs: + * NSObject.cs: + * NSDictionary.cs: + * PropertyListParser.cs: + * BinaryPropertyListWriter.cs: + * BinaryPropertyListParser.cs: + Prettify documentation. + 2015-02-20 Natalia Portillo * NSObject.cs: diff --git a/plist-cil/NSArray.cs b/plist-cil/NSArray.cs index 4df77ec..044995b 100644 --- a/plist-cil/NSArray.cs +++ b/plist-cil/NSArray.cs @@ -48,7 +48,7 @@ namespace Claunia.PropertyList /// /// Creates a array from an existing one /// - /// The array which should be wrapped by the NSArray + /// The array which should be wrapped by the NSArray. public NSArray(params NSObject[] a) { array = a; @@ -266,10 +266,14 @@ namespace Claunia.PropertyList } /// + /// /// Generates a valid ASCII property list which has this NSArray as its - /// root object. The generated property list complies with the format as - /// described in - /// Property List Programming Guide - Old-Style ASCII Property Lists. + /// root object. + /// + /// The generated property list complies with the format as + /// described in https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html + /// Property List Programming Guide - Old-Style ASCII Property Lists. + /// /// /// ASCII representation of this object. public string ToASCIIPropertyList() @@ -281,11 +285,14 @@ namespace Claunia.PropertyList } /// + /// /// Generates a valid ASCII property list in GnuStep format which has this - /// NSArray as its root object. The generated property list complies with - /// the format as described in - /// GnuStep - NSPropertyListSerialization class documentation - /// + /// NSArray as its root object. + /// + /// The generated property list complies with + /// the format as described in http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html + /// GnuStep - NSPropertyListSerialization class documentation. + /// /// /// GnuStep ASCII representation of this object. public string ToGnuStepASCIIPropertyList() diff --git a/plist-cil/NSData.cs b/plist-cil/NSData.cs index 1b253c9..12ea615 100644 --- a/plist-cil/NSData.cs +++ b/plist-cil/NSData.cs @@ -95,7 +95,7 @@ namespace Claunia.PropertyList } /// - /// Loads the bytes from this NSData object into a byte buffer + /// Loads the bytes from this NSData object into a byte buffer. /// /// The byte buffer which will contain the data /// The amount of data to copy @@ -105,7 +105,7 @@ namespace Claunia.PropertyList } /// - /// Loads the bytes from this NSData object into a byte buffer + /// Loads the bytes from this NSData object into a byte buffer. /// /// The byte buffer which will contain the data /// The start index. diff --git a/plist-cil/NSDictionary.cs b/plist-cil/NSDictionary.cs index 90e10fa..936fc89 100644 --- a/plist-cil/NSDictionary.cs +++ b/plist-cil/NSDictionary.cs @@ -29,12 +29,15 @@ using System.Text; namespace Claunia.PropertyList { /// + /// /// A NSDictionary is a collection of keys and values, essentially a Dictionary. /// The keys are simple Strings whereas the values can be any kind of NSObject. - /// - /// You can access the keys through the function AllKeys(). Access - /// to the objects stored for each key is given through the function - /// ObjectoForKey(String key). + /// + /// You can access the keys through the function . + /// + /// Access to the objects stored for each key is given through the function + /// . + /// /// /// @author Daniel Dreibrodt /// @author Natalia Portillo @@ -85,7 +88,7 @@ namespace Claunia.PropertyList } /// - /// Checks if the specified object key is contained in the current instance + /// Checks if the specified object key is contained in the current instance. /// /// true, if key is contained, false otherwise. /// Key. @@ -108,7 +111,7 @@ namespace Claunia.PropertyList /// Gets the corresponding to the specified key from the current instance. /// /// Key. - /// The object corresponding to the specified key, null if not found in the current instance + /// The object corresponding to the specified key, null if not found in the current instance. public NSObject Get(Object key) { if (key is string) @@ -383,8 +386,8 @@ namespace Claunia.PropertyList /// /// Generates a valid ASCII property list which has this NSDictionary as its /// root object. The generated property list complies with the format as - /// described in - /// Property List Programming Guide - Old-Style ASCII Property Lists. + /// described in https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html + /// Property List Programming Guide - Old-Style ASCII Property Lists. /// /// ASCII representation of this object. public string ToASCIIPropertyList() @@ -398,8 +401,8 @@ namespace Claunia.PropertyList /// /// Generates a valid ASCII property list in GnuStep format which has this /// NSDictionary as its root object. The generated property list complies with - /// the format as described in - /// GnuStep - NSPropertyListSerialization class documentation + /// the format as described in http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html + /// GnuStep - NSPropertyListSerialization class documentation. /// /// GnuStep ASCII representation of this object. public string ToGnuStepASCIIPropertyList() @@ -482,12 +485,10 @@ namespace Claunia.PropertyList dict.Add(key, value); } - /// The key to locate in the current instance. - /// Determines whether the current instance contains an entry with the specified key. /// - /// Containses the key. + /// Checks if there is any item contained in the current instance corresponding with the specified key. /// - /// true, if key was containsed, false otherwise. + /// true, if key was contained, false otherwise. /// Key. public bool ContainsKey(string key) { @@ -495,13 +496,13 @@ namespace Claunia.PropertyList } /// - /// Checks if there is any item contained in the current instance corresponding with the specified key. + /// Checks if there is any item contained in the current instance corresponding with the specified value. /// /// true, if value is contained, false otherwise. - /// Key. - public bool ContainsValue(NSObject key) + /// Key. + public bool ContainsValue(NSObject value) { - return dict.ContainsValue(key); + return dict.ContainsValue(value); } /// @@ -609,7 +610,7 @@ namespace Claunia.PropertyList /// Removes the specified item. /// /// Item to remove. - /// true if successfully removed, false if not, or if item is not in current instance + /// true if successfully removed, false if not, or if item is not in current instance. public bool Remove(KeyValuePair item) { return dict.Remove(item.Key); diff --git a/plist-cil/NSNumber.cs b/plist-cil/NSNumber.cs index 2f101fb..9e083de 100644 --- a/plist-cil/NSNumber.cs +++ b/plist-cil/NSNumber.cs @@ -220,7 +220,7 @@ namespace Claunia.PropertyList /// /// The number's bool value. /// - /// true if the value is true or non-zero, false otherwise. + /// true if the value is true or non-zero, false otherwise. public bool ToBool() { if (type == BOOLEAN) diff --git a/plist-cil/NSObject.cs b/plist-cil/NSObject.cs index 401e012..d751b11 100644 --- a/plist-cil/NSObject.cs +++ b/plist-cil/NSObject.cs @@ -31,9 +31,12 @@ using System.IO; namespace Claunia.PropertyList { /// + /// /// Abstract interface for any object contained in a property list. + /// /// The names and functions of the various objects orient themselves /// towards Apple's Cocoa API. + /// /// /// @author Daniel Dreibrodt /// @author Natalia Portillo @@ -119,8 +122,8 @@ namespace Claunia.PropertyList /// /// Helper method that adds correct identation to the xml output. - /// Calling this method will add level number of tab characters - /// to the xml string. + /// Calling this method will add level number of tab characters + /// to the xml string. /// /// The string builder for the XML document. /// The level of identation. @@ -215,19 +218,21 @@ namespace Claunia.PropertyList } /// + /// /// Creates a NSObject representing the given .NET Object. - /// + /// /// Numerics of type , , , , , or are wrapped as NSNumber objects. - /// - /// Strings are wrapped as NSString objects abd byte arrays as NSData objects. - /// - /// Date objects are wrapped as NSDate objects. - /// - /// Serializable classes are serialized and their data is stored in NSData objects. - /// - /// Arrays and Collection objects are converted to NSArrays where each array member is wrapped into a NSObject. - /// - /// Map objects are converted to NSDictionaries. Each key is converted to a string and each value wrapped into a NSObject. + /// + /// Strings are wrapped as objects and byte arrays as objects. + /// + /// DateTime objects are wrapped as objects. + /// + /// Serializable classes are serialized and their data is stored in objects. + /// + /// Arrays and Collection objects are converted to where each array member is wrapped into a . + /// + /// Dictionaries are converted to . Each key is converted to a string and each value wrapped into a . + /// /// /// The object to represent. ///A NSObject equivalent to the given object. @@ -485,7 +490,7 @@ namespace Claunia.PropertyList } /// - /// Determines if the specific NSObject is the same as the NSObject overriding this method + /// Determines if the specific NSObject is the same as the NSObject overriding this method. /// /// The to compare with the current . /// true if the specified is equal to the current diff --git a/plist-cil/NSSet.cs b/plist-cil/NSSet.cs index f5b5849..fb56287 100644 --- a/plist-cil/NSSet.cs +++ b/plist-cil/NSSet.cs @@ -30,9 +30,12 @@ using System.Text; namespace Claunia.PropertyList { /// + /// /// A set is an interface to an unordered collection of objects. + /// /// This implementation uses a as the underlying /// data structure. + /// /// /// @author Daniel Dreibrodt /// @author Natalia Portillo @@ -50,23 +53,10 @@ namespace Claunia.PropertyList set = new List(); } - /** - * Creates an empty set. - * - * @param ordered Indicates whether the created set should be ordered or unordered. - * @see java.util.LinkedHashSet - * @see java.util.TreeSet - */ - // No need for this. It's easier in C# to just follow NSSet unordered as-is - /* - public NSSet(boolean ordered) { - this.ordered = ordered; - if (!ordered) - set = new LinkedHashSet(); - else - set = new TreeSet(); - }*/ - + /// + /// Creates an empty set. + /// + /// Should the set be ordered on operations? public NSSet(bool ordered) { this.ordered = ordered; @@ -75,7 +65,7 @@ namespace Claunia.PropertyList /// - /// Create a set and fill it with the given objects. + /// Creates a set and fill it with the given objects. /// /// The objects to populate the set. public NSSet(params NSObject[] objects) @@ -83,24 +73,11 @@ namespace Claunia.PropertyList set = new List(objects); } - /** - * Create a set and fill it with the given objects. - * - * @param objects The objects to populate the set. - * @see java.util.LinkedHashSet - * @see java.util.TreeSet - */ - // No need for this. It's easier in C# to just follow NSSet unordered as-is - /* - public NSSet(boolean ordered, NSObject... objects) { - this.ordered = ordered; - if (!ordered) - set = new LinkedHashSet(); - else - set = new TreeSet(); - set.addAll(Arrays.asList(objects)); - }*/ - + /// + /// Creates a set and fill it with the given objects. + /// + /// The objects to populate the set. + /// Should the set be ordered on operations? public NSSet(bool ordered, params NSObject[] objects) { this.ordered = ordered; @@ -150,10 +127,10 @@ namespace Claunia.PropertyList } /// - /// Returns one of the objects in the set, or null + /// Returns one of the objects in the set, or null /// if the set contains no objects. /// - /// The first object in the set, or null if the set is empty. + /// The first object in the set, or null if the set is empty. public NSObject AnyObject() { lock (set) @@ -177,7 +154,7 @@ namespace Claunia.PropertyList /// and returns that object if it is present. /// /// The object to look for. - /// The object if it is present, null otherwise. + /// The object if it is present, null otherwise. public NSObject Member(NSObject obj) { lock (set) @@ -229,7 +206,7 @@ namespace Claunia.PropertyList /// /// Returns an enumerator object that lets you iterate over all elements of the set. - /// This is the equivalent to objectEnumerator in the Cocoa implementation + /// This is the equivalent to objectEnumerator in the Cocoa implementation /// of NSSet. /// /// The iterator for the set. diff --git a/plist-cil/NSString.cs b/plist-cil/NSString.cs index 43320ba..f2b7230 100644 --- a/plist-cil/NSString.cs +++ b/plist-cil/NSString.cs @@ -37,7 +37,7 @@ namespace Claunia.PropertyList string content; /// - /// Creates an NSString from its binary representation. + /// Creates a NSString from its binary representation. /// /// The binary representation. /// The encoding of the binary representation, the name of a supported charset. diff --git a/plist-cil/PropertyListParser.cs b/plist-cil/PropertyListParser.cs index fb13138..8d76908 100644 --- a/plist-cil/PropertyListParser.cs +++ b/plist-cil/PropertyListParser.cs @@ -334,7 +334,7 @@ namespace Claunia.PropertyList } /// - /// Saves a property list with the given object as root into a ASCII file. + /// Saves a property list with the given object as root into a GnuStep ASCII file. /// /// The root object. /// The output file. @@ -352,7 +352,7 @@ namespace Claunia.PropertyList } /// - /// Saves a property list with the given object as root into a ASCII file. + /// Saves a property list with the given object as root into a GnuStep ASCII file. /// /// The root object. /// The output file. @@ -370,7 +370,7 @@ namespace Claunia.PropertyList } /// - /// Converts a given property list file into ASCII format. + /// Converts a given property list file into GnuStep ASCII format. /// /// The source file. /// The target file. diff --git a/plist-cil/UID.cs b/plist-cil/UID.cs index b9f0ec3..c76d9f0 100644 --- a/plist-cil/UID.cs +++ b/plist-cil/UID.cs @@ -28,7 +28,7 @@ using System.Text; namespace Claunia.PropertyList { /// - /// A UID. Only found in binary property lists that are keyed archives. + /// An UID. Only found in binary property lists that are keyed archives. /// /// @author Daniel Dreibrodt /// @author Natalia Portillo