Skip to content

Commit

Permalink
Prettify documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
claunia committed Feb 20, 2015
1 parent 2a1608a commit 7b55074
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 94 deletions.
5 changes: 3 additions & 2 deletions plist-cil/BinaryPropertyListParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
namespace Claunia.PropertyList
{
/// <summary>
/// <para>
/// 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.
///
/// </para><para>
/// Parsing is done by calling the static <see cref="Parse(byte[])"/>,
/// <see cref="Parse(FileInfo)"/> and <see cref="Parse(Stream)"/> methods.
///
/// </para>
/// </summary>
/// @author Daniel Dreibrodt
/// @author Natalia Portillo
Expand Down
10 changes: 7 additions & 3 deletions plist-cil/BinaryPropertyListWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@
namespace Claunia.PropertyList
{
/// <summary>
/// <para>
/// 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.
/// </para><para>
/// 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.
/// </para>
/// </summary>
/// @author Keith Randall
/// @author Natalia Portillo
Expand Down
15 changes: 15 additions & 0 deletions plist-cil/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
2015-02-20 Natalia Portillo <[email protected]>

* 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 <[email protected]>

* NSObject.cs:
Expand Down
23 changes: 15 additions & 8 deletions plist-cil/NSArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public NSArray(int length)
/// <summary>
/// Creates a array from an existing one
/// </summary>
/// <param name="a">The array which should be wrapped by the NSArray</param>
/// <param name="a">The array which should be wrapped by the NSArray.</param>
public NSArray(params NSObject[] a)
{
array = a;
Expand Down Expand Up @@ -266,10 +266,14 @@ internal override void ToBinary(BinaryPropertyListWriter outPlist)
}

/// <summary>
/// <para>
/// 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 <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html">
/// Property List Programming Guide - Old-Style ASCII Property Lists</a>.
/// root object.
/// </para><para>
/// 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.
/// </para>
/// </summary>
/// <returns>ASCII representation of this object.</returns>
public string ToASCIIPropertyList()
Expand All @@ -281,11 +285,14 @@ public string ToASCIIPropertyList()
}

/// <summary>
/// <para>
/// 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 <a href="http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html">
/// GnuStep - NSPropertyListSerialization class documentation
/// </a>
/// NSArray as its root object.
/// </para><para>
/// 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.
/// </para>
/// </summary>
/// <returns>GnuStep ASCII representation of this object.</returns>
public string ToGnuStepASCIIPropertyList()
Expand Down
4 changes: 2 additions & 2 deletions plist-cil/NSData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public int Length
}

/// <summary>
/// Loads the bytes from this NSData object into a byte buffer
/// Loads the bytes from this NSData object into a byte buffer.
/// </summary>
/// <param name="buf">The byte buffer which will contain the data</param>
/// <param name="length">The amount of data to copy</param>
Expand All @@ -105,7 +105,7 @@ public void GetBytes(MemoryStream buf, int length)
}

/// <summary>
/// Loads the bytes from this NSData object into a byte buffer
/// Loads the bytes from this NSData object into a byte buffer.
/// </summary>
/// <param name="buf">The byte buffer which will contain the data</param>
/// <param name="rangeStart">The start index.</param>
Expand Down
39 changes: 20 additions & 19 deletions plist-cil/NSDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@
namespace Claunia.PropertyList
{
/// <summary>
/// <para>
/// 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 <code>AllKeys()</code>. Access
/// to the objects stored for each key is given through the function
/// <code>ObjectoForKey(String key)</code>.
/// </para><para>
/// You can access the keys through the function <see cref="Keys"/>.
/// </para><para>
/// Access to the objects stored for each key is given through the function
/// <see cref="ObjectForKey"/>.
/// </para>
/// </summary>
/// @author Daniel Dreibrodt
/// @author Natalia Portillo
Expand Down Expand Up @@ -85,7 +88,7 @@ public bool IsEmpty
}

/// <summary>
/// Checks if the specified object key is contained in the current instance
/// Checks if the specified object key is contained in the current instance.
/// </summary>
/// <returns><c>true</c>, if key is contained, <c>false</c> otherwise.</returns>
/// <param name="key">Key.</param>
Expand All @@ -108,7 +111,7 @@ public bool Remove(Object key)
/// Gets the <see cref="NSObject"/> corresponding to the specified key from the current instance.
/// </summary>
/// <param name="key">Key.</param>
/// <returns>The object corresponding to the specified key, null if not found in the current instance</returns>
/// <returns>The object corresponding to the specified key, null if not found in the current instance.</returns>
public NSObject Get(Object key)
{
if (key is string)
Expand Down Expand Up @@ -383,8 +386,8 @@ internal override void ToBinary(BinaryPropertyListWriter outPlist)
/// <summary>
/// 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 <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html">
/// Property List Programming Guide - Old-Style ASCII Property Lists</a>.
/// described in https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html
/// Property List Programming Guide - Old-Style ASCII Property Lists.
/// </summary>
/// <returns>ASCII representation of this object.</returns>
public string ToASCIIPropertyList()
Expand All @@ -398,8 +401,8 @@ public string ToASCIIPropertyList()
/// <summary>
/// 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 <a href="http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html">
/// GnuStep - NSPropertyListSerialization class documentation</a>
/// the format as described in http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html
/// GnuStep - NSPropertyListSerialization class documentation.
/// </summary>
/// <returns>GnuStep ASCII representation of this object.</returns>
public string ToGnuStepASCIIPropertyList()
Expand Down Expand Up @@ -482,26 +485,24 @@ public void Add(string key, NSObject value)
dict.Add(key, value);
}

/// <Docs>The key to locate in the current instance.</Docs>
/// <para>Determines whether the current instance contains an entry with the specified key.</para>
/// <summary>
/// Containses the key.
/// Checks if there is any item contained in the current instance corresponding with the specified key.
/// </summary>
/// <returns><c>true</c>, if key was containsed, <c>false</c> otherwise.</returns>
/// <returns><c>true</c>, if key was contained, <c>false</c> otherwise.</returns>
/// <param name="key">Key.</param>
public bool ContainsKey(string key)
{
return dict.ContainsKey(key);
}

/// <summary>
/// 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.
/// </summary>
/// <returns><c>true</c>, if value is contained, <c>false</c> otherwise.</returns>
/// <param name="key">Key.</param>
public bool ContainsValue(NSObject key)
/// <param name="value">Key.</param>
public bool ContainsValue(NSObject value)
{
return dict.ContainsValue(key);
return dict.ContainsValue(value);
}

/// <summary>
Expand Down Expand Up @@ -609,7 +610,7 @@ public void CopyTo(KeyValuePair<string, NSObject>[] array, int arrayIndex)
/// Removes the specified item.
/// </summary>
/// <param name="item">Item to remove.</param>
/// <returns><c>true</c> if successfully removed, <c>false</c> if not, or if item is not in current instance</returns>
/// <returns><c>true</c> if successfully removed, <c>false</c> if not, or if item is not in current instance.</returns>
public bool Remove(KeyValuePair<string, NSObject> item)
{
return dict.Remove(item.Key);
Expand Down
2 changes: 1 addition & 1 deletion plist-cil/NSNumber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public bool isReal()
/// <summary>
/// The number's bool value.
/// </summary>
/// <returns><code>true</code> if the value is true or non-zero, <code>false</code> otherwise.</returns>
/// <returns><c>true</c> if the value is true or non-zero, <c>false</c> otherwise.</returns>
public bool ToBool()
{
if (type == BOOLEAN)
Expand Down
33 changes: 19 additions & 14 deletions plist-cil/NSObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@
namespace Claunia.PropertyList
{
/// <summary>
/// <para>
/// Abstract interface for any object contained in a property list.
/// </para><para>
/// The names and functions of the various objects orient themselves
/// towards Apple's Cocoa API.
/// </para>
/// </summary>
/// @author Daniel Dreibrodt
/// @author Natalia Portillo
Expand Down Expand Up @@ -119,8 +122,8 @@ public string ToXmlPropertyList()

/// <summary>
/// Helper method that adds correct identation to the xml output.
/// Calling this method will add <code>level</code> number of tab characters
/// to the <code>xml</code> string.
/// Calling this method will add <c>level</c> number of tab characters
/// to the <c>xml</c> string.
/// </summary>
/// <param name="xml">The string builder for the XML document.</param>
/// <param name="level">The level of identation.</param>
Expand Down Expand Up @@ -215,19 +218,21 @@ public static NSSet Wrap(List<Object> value)
}

/// <summary>
/// <para>
/// Creates a NSObject representing the given .NET Object.
///
/// </para><para>
/// Numerics of type <see cref="bool"/>, <see cref="int"/>, <see cref="long"/>, <see cref="short"/>, <see cref="byte"/>, <see cref="float"/> or <see cref="double"/> 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.
/// </para><para>
/// Strings are wrapped as <see cref="NSString"/> objects and byte arrays as <see cref="NSData"/> objects.
/// </para><para>
/// DateTime objects are wrapped as <see cref="NSDate"/> objects.
/// </para><para>
/// Serializable classes are serialized and their data is stored in <see cref="NSData"/> objects.
/// </para><para>
/// Arrays and Collection objects are converted to <see cref="NSArray"/> where each array member is wrapped into a <see cref="NSObject"/>.
/// </para><para>
/// Dictionaries are converted to <see cref="NSDictionary"/>. Each key is converted to a string and each value wrapped into a <see cref="NSObject"/>.
/// </para>
/// </summary>
/// <param name="o">The object to represent.</param>
///<returns>A NSObject equivalent to the given object.</returns>
Expand Down Expand Up @@ -485,7 +490,7 @@ internal static bool ArrayEquals(NSObject[] arrayA, NSObject[] arrayB)
}

/// <summary>
/// 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.
/// </summary>
/// <param name="obj">The <see cref="Claunia.PropertyList.NSObject"/> to compare with the current <see cref="Claunia.PropertyList.NSObject"/>.</param>
/// <returns><c>true</c> if the specified <see cref="Claunia.PropertyList.NSObject"/> is equal to the current
Expand Down
Loading

0 comments on commit 7b55074

Please sign in to comment.