Skip to content

Commit

Permalink
Add all missing comments for documentation and Intellisense (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes authored Aug 2, 2018
1 parent 1b6a37c commit 8deae82
Show file tree
Hide file tree
Showing 16 changed files with 145 additions and 62 deletions.
8 changes: 6 additions & 2 deletions source/System/Array.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void Copy(Array sourceArray, Array destinationArray, int length)
public static extern void Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length);

/// <summary>
/// Sets a range of elements in the Array to zero, to false, or to nullNothingnullptrunita null reference (Nothing in Visual Basic), depending on the element type.
/// Sets a range of elements in the Array to zero, to false, or to null reference (Nothing in Visual Basic), depending on the element type.
/// </summary>
/// <param name="array">The Array whose elements need to be cleared.</param>
/// <param name="index">The starting index of the range of elements to clear.</param>
Expand Down Expand Up @@ -177,6 +177,10 @@ void IList.RemoveAt(int index)
throw new NotSupportedException();
}

/// <summary>
/// Creates a shallow copy of the <see cref="Array"/>.
/// </summary>
/// <returns>A shallow copy of the <see cref="Array"/>.</returns>
public Object Clone()
{
var length = Length;
Expand Down Expand Up @@ -211,7 +215,7 @@ public static int BinarySearch(Array array, Object value, IComparer comparer)
/// <para>-or-</para>
/// <para>nullNothingnullptrunit a null reference(Nothing in Visual Basic) to use the IComparable implementation of each element.</para></param>
/// <returns>The index of the specified value in the specified array, if value is found. If value is not found and value is less than one or more elements in array, a negative number which is the bitwise complement of the index of the first element that is larger than value. If value is not found and value is greater than any of the elements in array, a negative number which is the bitwise complement of (the index of the last element plus 1).</returns>
/// <exception cref="System.InvalidOperationException">comparer is nullNothingnullptrunita null reference (Nothing in Visual Basic), value does not implement the IComparable interface, and the search encounters an element that does not implement the IComparable interface.</exception>
/// <exception cref="System.InvalidOperationException">comparer is null reference (Nothing in Visual Basic), value does not implement the IComparable interface, and the search encounters an element that does not implement the IComparable interface.</exception>
public static int BinarySearch(Array array, int index, int length, Object value, IComparer comparer)
{
var lo = index;
Expand Down
2 changes: 1 addition & 1 deletion source/System/Byte.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public String ToString(String format)
/// </summary>
/// <param name="s">A string that contains a number to convert. The string is interpreted using the Integer style. </param>
/// <returns>A byte value that is equivalent to the number contained in s.</returns>
/// <exception cref="System.ArgumentNullException">s is nullNothingnullptrunita null reference (Nothing in Visual Basic).</exception>
/// <exception cref="System.ArgumentNullException">s is null reference (Nothing in Visual Basic).</exception>
[CLSCompliant(false)]
public static byte Parse(String s)
{
Expand Down
107 changes: 71 additions & 36 deletions source/System/Collections/ArrayList.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion source/System/Collections/HashTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public ICollection Values
/// Gets or sets the element with the specified key.
/// </summary>
/// <param name="key">The key of the element to get or set.</param>
/// <returns>The element with the specified key, or null if the key does not exist.</returns>
/// <returns>The element with the specified key, or <see langword="null"/> if the key does not exist.</returns>
public object this[object key]
{
get
Expand Down
2 changes: 1 addition & 1 deletion source/System/Collections/IDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public interface IDictionary : ICollection
/// Gets or sets the element with the specified key.
/// </summary>
/// <param name="key">The key of the element to get or set.</param>
/// <returns>The element with the specified key, or null if the key does not exist.</returns>
/// <returns>The element with the specified key, or <see langword="null"/> if the key does not exist.</returns>
object this[object key] { get; set; }

/// <summary>
Expand Down
20 changes: 10 additions & 10 deletions source/System/Convert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static char ToChar(ushort value)
/// </summary>
/// <param name="value">A string that contains the number to convert.</param>
/// <param name="fromBase">The base of the number in <paramref name="value"/>, which must be 2, 8, 10, or 16. See remark bellow about platform support.</param>
/// <returns>An 8-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is null.</returns>
/// <returns>An 8-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is <see langword="null"/>.</returns>
/// <remarks>
/// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method,
/// which is supporting only conversions for base 10 values. In that case, any call using a <paramref name="fromBase"/> with a value other than 10 will throw a <see cref="NotImplementedException"/>.
Expand All @@ -71,7 +71,7 @@ public static sbyte ToSByte(string value, int fromBase = 10)
/// </summary>
/// <param name="value">A string that contains the number to convert.</param>
/// <param name="fromBase">The base of the number in <paramref name="value"/>, which must be 2, 8, 10, or 16. See remark bellow about platform support.</param>
/// <returns>An 8-bit unsigned integer that is equivalent to value, or zero if value is null.</returns>
/// <returns>An 8-bit unsigned integer that is equivalent to value, or zero if value is <see langword="null"/>.</returns>
/// <remarks>
/// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method,
/// which is supporting only conversions for base 10 values. In that case, any call using a <paramref name="fromBase"/> with a value other than 10 will throw a <see cref="NotImplementedException"/>.
Expand All @@ -88,7 +88,7 @@ public static byte ToByte(string value, int fromBase = 10)
/// </summary>
/// <param name="value">A string that contains the number to convert.</param>
/// <param name="fromBase">The base of the number in <paramref name="value"/>, which must be 2, 8, 10, or 16. See remark bellow about platform support.</param>
/// <returns>A 16-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is null.</returns>
/// <returns>A 16-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is <see langword="null"/>.</returns>
/// <remarks>
/// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method,
/// which is supporting only conversions for base 10 values. In that case, any call using a <paramref name="fromBase"/> with a value other than 10 will throw a <see cref="NotImplementedException"/>.
Expand All @@ -105,7 +105,7 @@ public static short ToInt16(string value, int fromBase = 10)
/// </summary>
/// <param name="value">A string that contains the number to convert.</param>
/// <param name="fromBase">The base of the number in <paramref name="value"/>, which must be 2, 8, 10, or 16. See remark bellow about platform support.</param>
/// <returns>A 16-bit unsigned integer that is equivalent to the number in value, or 0 (zero) if value is null.</returns>
/// <returns>A 16-bit unsigned integer that is equivalent to the number in value, or 0 (zero) if value is <see langword="null"/>.</returns>
/// <remarks>
/// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method,
/// which is supporting only conversions for base 10 values. In that case, any call using a <paramref name="fromBase"/> with a value other than 10 will throw a <see cref="NotImplementedException"/>.
Expand All @@ -123,7 +123,7 @@ public static ushort ToUInt16(string value, int fromBase = 10)
/// </summary>
/// <param name="value">A string that contains the number to convert.</param>
/// <param name="fromBase">The base of the number in <paramref name="value"/>, which must be 2, 8, 10, or 16. See remark bellow about platform support.</param>
/// <returns>A 32-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is null.</returns>
/// <returns>A 32-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is <see langword="null"/>.</returns>
/// <remarks>
/// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method,
/// which is supporting only conversions for base 10 values. In that case, any call using a <paramref name="fromBase"/> with a value other than 10 will throw a <see cref="NotImplementedException"/>.
Expand All @@ -140,7 +140,7 @@ public static int ToInt32(string value, int fromBase = 10)
/// </summary>
/// <param name="value">A string that contains the number to convert.</param>
/// <param name="fromBase">The base of the number in <paramref name="value"/>, which must be 2, 8, 10, or 16. See remark bellow about platform support.</param>
/// <returns>A 32-bit unsigned integer that is equivalent to the number in value, or 0 (zero) if value is null.</returns>
/// <returns>A 32-bit unsigned integer that is equivalent to the number in value, or 0 (zero) if value is <see langword="null"/>.</returns>
/// <remarks>
/// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method,
/// which is supporting only conversions for base 10 values. In that case, any call using a <paramref name="fromBase"/> with a value other than 10 will throw a <see cref="NotImplementedException"/>.
Expand All @@ -158,13 +158,13 @@ public static uint ToUInt32(string value, int fromBase = 10)
/// </summary>
/// <param name="value">A string that contains a number to convert.</param>
/// <param name="fromBase">The base of the number in <paramref name="value"/>, which must be 2, 8, 10, or 16. See remark bellow about platform support.</param>
/// <returns>A 64-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is null.</returns>
/// <returns>A 64-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is <see langword="null"/>.</returns>
/// <remarks>
/// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method,
/// which is supporting only conversions for base 10 values. In that case, any call using a <paramref name="fromBase"/> with a value other than 10 will throw a <see cref="NotImplementedException"/>.
/// </remarks>
/// <exception cref="ArgumentException"><paramref name="fromBase"/> is not 2, 8, 10, or 16.</exception>
/// <exception cref="NotImplementedException">If the platform doesn't have support to convert from non-base 10 values.</exception
/// <exception cref="NotImplementedException">If the platform doesn't have support to convert from non-base 10 values.</exception>
public static long ToInt64(string value, int fromBase = 10)
{
return NativeToInt64(value, true, Int64.MinValue, Int64.MaxValue, fromBase);
Expand All @@ -175,7 +175,7 @@ public static long ToInt64(string value, int fromBase = 10)
/// </summary>
/// <param name="value">A string that contains the number to convert.</param>
/// <param name="fromBase">The base of the number in <paramref name="value"/>, which must be 2, 8, 10, or 16. See remark bellow about platform support.</param>
/// <returns>A 64-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is null.</returns>
/// <returns>A 64-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is <see langword="null"/>.</returns>
/// <remarks>
/// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method,
/// which is supporting only conversions for base 10 values. In that case, any call using a <paramref name="fromBase"/> with a value other than 10 will throw a <see cref="NotImplementedException"/>.
Expand All @@ -192,7 +192,7 @@ public static ulong ToUInt64(string value, int fromBase = 10)
/// Converts the specified string representation of a number to an equivalent double-precision floating-point number.
/// </summary>
/// <param name="value">A string that contains the number to convert.</param>
/// <returns>A double-precision floating-point number that is equivalent to the number in value, or 0 (zero) if value is null.</returns>
/// <returns>A double-precision floating-point number that is equivalent to the number in value, or 0 (zero) if value is <see langword="null"/>.</returns>
public static double ToDouble(string value)
{
return NativeToDouble(value);
Expand Down
2 changes: 1 addition & 1 deletion source/System/DateTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public static int Compare(DateTime t1, DateTime t2)
/// <summary>
/// Compares the value of this instance to a specified object that contains a specified DateTime value, and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified DateTime value.
/// </summary>
/// <param name="val">A boxed object to compare, or nullNothingnullptrunita null reference (Nothing in Visual Basic).</param>
/// <param name="val">A boxed object to compare, or null reference (Nothing in Visual Basic).</param>
/// <returns>A signed number indicating the relative values of this instance and value.</returns>
public int CompareTo(Object val)
{
Expand Down
6 changes: 3 additions & 3 deletions source/System/Delegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public abstract class Delegate
/// </summary>
/// <param name="a">The delegate whose invocation list comes first. </param>
/// <param name="b">The delegate whose invocation list comes last. </param>
/// <returns>A new delegate with an invocation list that concatenates the invocation lists of a and b in that order. Returns a if b is nullNothingnullptrunita null reference (Nothing in Visual Basic), returns b if a is a null reference, and returns a null reference if both a and b are null references.</returns>
/// <returns>A new delegate with an invocation list that concatenates the invocation lists of a and b in that order. Returns a if b is null reference (Nothing in Visual Basic), returns b if a is a null reference, and returns a null reference if both a and b are null references.</returns>
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern Delegate Combine(Delegate a, Delegate b);

Expand All @@ -47,7 +47,7 @@ public extern MethodInfo Method
/// Gets the class instance on which the current delegate invokes the instance method.
/// </summary>
/// <value>
/// The object on which the current delegate invokes the instance method, if the delegate represents an instance method; nullNothingnullptrunita null reference (Nothing in Visual Basic) if the delegate represents a static method.
/// The object on which the current delegate invokes the instance method, if the delegate represents an instance method; null reference (Nothing in Visual Basic) if the delegate represents a static method.
/// </value>
public extern Object Target
{
Expand All @@ -60,7 +60,7 @@ public extern Object Target
/// </summary>
/// <param name="source">The delegate from which to remove the invocation list of value.</param>
/// <param name="value">The delegate that supplies the invocation list to remove from the invocation list of source.</param>
/// <returns>A new delegate with an invocation list formed by taking the invocation list of source and removing the last occurrence of the invocation list of value, if the invocation list of value is found within the invocation list of source. Returns source if value is nullNothingnullptrunita null reference (Nothing in Visual Basic) or if the invocation list of value is not found within the invocation list of source. Returns a null reference if the invocation list of value is equal to the invocation list of source or if source is a null reference.</returns>
/// <returns>A new delegate with an invocation list formed by taking the invocation list of source and removing the last occurrence of the invocation list of value, if the invocation list of value is found within the invocation list of source. Returns source if value is null reference (Nothing in Visual Basic) or if the invocation list of value is not found within the invocation list of source. Returns a null reference if the invocation list of value is equal to the invocation list of source or if source is a null reference.</returns>
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern Delegate Remove(Delegate source, Delegate value);

Expand Down
2 changes: 1 addition & 1 deletion source/System/Double.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public String ToString(String format)
/// Converts the string representation of a number to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.
/// </summary>
/// <param name="s">A string containing a number to convert. </param>
/// <param name="result">When this method returns, contains the double-precision floating-point number equivalent to the s parameter, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is nullNothingnullptrunita null reference (Nothing in Visual Basic), is not a number in a valid format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized.</param>
/// <param name="result">When this method returns, contains the double-precision floating-point number equivalent to the s parameter, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is null reference (Nothing in Visual Basic), is not a number in a valid format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized.</param>
/// <returns>true if s was converted successfully; otherwise, false.</returns>
public static bool TryParse(string s, out double result)
{
Expand Down
5 changes: 5 additions & 0 deletions source/System/Exception.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public class Exception
private readonly Exception _innerException;

private object _stackTrace;

/// <summary>
/// Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.
/// </summary>
/// <value>The HRESULT value./// </value>
protected int HResult;

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions source/System/Guid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace System
{
/// <summary>
/// Represents a globally unique identifier (GUID).
/// </summary>
[Serializable]
public struct Guid
{
Expand Down
2 changes: 1 addition & 1 deletion source/System/IFormatProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IFormatProvider
/// Returns an object that provides formatting services for the specified type.
/// </summary>
/// <param name="formatType">An object that specifies the type of format object to return. </param>
/// <returns>An instance of the object specified by formatType, if the IFormatProvider implementation can supply that type of object; otherwise, nullNothingnullptrunita null reference (Nothing in Visual Basic).</returns>
/// <returns>An instance of the object specified by formatType, if the IFormatProvider implementation can supply that type of object; otherwise, null reference (Nothing in Visual Basic).</returns>
Object GetFormat(Type formatType);
}
}
Loading

0 comments on commit 8deae82

Please sign in to comment.