[docs] Import of Microsoft BCL Documentation.
[mono.git] / mcs / class / corlib / Documentation / en / System / Tuple`1.xml
index 3aba8b27dc647650072788c5fcb35b99186cb0f7..e961a307f1288aa44c0bf3266ad2c53f1641f631 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
 <Type Name="Tuple&lt;T1&gt;" FullName="System.Tuple&lt;T1&gt;">
   <TypeSignature Language="C#" Value="public class Tuple&lt;T1&gt; : IComparable, ITuple, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable" />
   <TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit Tuple`1&lt;T1&gt; extends System.Object implements class System.Collections.IStructuralComparable, class System.Collections.IStructuralEquatable, class System.IComparable, class System.ITuple" />
   </Interfaces>
   <Docs>
     <typeparam name="T1">To be added.</typeparam>
-    <summary>To be added.</summary>
-    <remarks>To be added.</remarks>
+    <remarks>
+      <attribution license="cc4" from="Microsoft" modified="false" />
+      <para>A tuple is a data structure that has a specific number and sequence of values. The <see cref="T:System.Tuple`1" /> class represents a 1-tuple, or singleton, which is a tuple that has a single component. A singleton is used comparatively rarely in application development.</para>
+      <para>You can instantiate a <see cref="T:System.Tuple`1" /> object by calling either the <see cref="M:System.Tuple`1.#ctor(`0)" /> constructor or the static <see cref="M:System.Tuple.Create``1(``0)" /> method. You can retrieve the value of the tuple's single component by using the read-only <see cref="P:System.Tuple`1.Item1" /> instance property.</para>
+    </remarks>
+    <summary>
+      <attribution license="cc4" from="Microsoft" modified="false" />
+      <para>Represents a 1-tuple, or singleton. </para>
+    </summary>
   </Docs>
   <Members>
     <Member MemberName=".ctor">
         <Parameter Name="obj" Type="System.Object" />
       </Parameters>
       <Docs>
-        <param name="obj">To be added.</param>
-        <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>The <paramref name="obj" /> parameter is considered to be equal to the current instance under the following conditions:</para>
+          <list type="bullet">
+            <item>
+              <para>It is a <see cref="T:System.Tuple`1" /> object.</para>
+            </item>
+            <item>
+              <para>Its single component is of the same type as the current instance.</para>
+            </item>
+            <item>
+              <para>Its single component is equal to that of the current instance. Equality is determined by the default object equality comparer for each component. </para>
+            </item>
+          </list>
+        </remarks>
+        <summary>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>Returns a value that indicates whether the current <see cref="T:System.Tuple`1" /> object is equal to a specified object.</para>
+        </summary>
+        <param name="obj">
+          <attribution license="cc4" from="Microsoft" modified="false" />The object to compare with this instance.</param>
       </Docs>
     </Member>
     <Member MemberName="GetHashCode">
       </ReturnValue>
       <Parameters />
       <Docs>
-        <summary>To be added.</summary>
         <returns>To be added.</returns>
         <remarks>To be added.</remarks>
+        <summary>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>Returns the hash code for the current <see cref="T:System.Tuple`1" /> object.</para>
+        </summary>
       </Docs>
     </Member>
     <Member MemberName="Item1">
         <ReturnType>T1</ReturnType>
       </ReturnValue>
       <Docs>
-        <summary>To be added.</summary>
         <value>To be added.</value>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>You can determine the type of the <see cref="P:System.Tuple`1.Item1" /> component in one of two ways:</para>
+          <list type="bullet">
+            <item>
+              <para>By calling the GetType method on the value that is returned by the <see cref="P:System.Tuple`1.Item1" /> property. </para>
+            </item>
+            <item>
+              <para>By retrieving the <see cref="T:System.Type" /> object that represents the <see cref="T:System.Tuple`1" /> object, and retrieving the first element from the array that is returned by its <see cref="M:System.Type.GetGenericArguments" /> method.</para>
+            </item>
+          </list>
+          <para>The example illustrates both approaches.</para>
+        </remarks>
+        <summary>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>Gets the value of the <see cref="T:System.Tuple`1" /> object's single component. </para>
+        </summary>
       </Docs>
     </Member>
     <Member MemberName="System.Collections.IStructuralComparable.CompareTo">
         <Parameter Name="comparer" Type="System.Collections.IComparer" />
       </Parameters>
       <Docs>
-        <param name="other">To be added.</param>
-        <param name="comparer">To be added.</param>
-        <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>Although this method can be called directly, it is most commonly called by collection sorting methods that include <see cref="T:System.Collections.IComparer" /> parameters to order the members of a collection. For example, it is called by the <see cref="M:System.Array.Sort(System.Array,System.Collections.IComparer)" /> method and the <see cref="M:System.Collections.SortedList.Add(System.Object,System.Object)" /> method of a <see cref="T:System.Collections.SortedList" /> object that is instantiated by using the <see cref="M:System.Collections.SortedList.#ctor(System.Collections.IComparer)" /> constructor.</para>
+          <block subset="none" type="note">
+            <para>The <see cref="M:System.Tuple`1.System#Collections#IStructuralComparable#CompareTo(System.Object,System.Collections.IComparer)" /> method is intended for use in sorting operations. It should not be used when the primary purpose of a comparison is to determine whether two objects are equal. To determine whether two objects are equal, call the <see cref="M:System.Tuple`1.System#Collections#IStructuralEquatable#Equals(System.Object,System.Collections.IEqualityComparer)" /> method.</para>
+          </block>
+        </remarks>
+        <summary>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>Compares the current <see cref="T:System.Tuple`1" /> object to a specified object by using a specified comparer, and returns an integer that indicates whether the current object is before, after, or in the same position as the specified object in the sort order.</para>
+        </summary>
+        <param name="other">
+          <attribution license="cc4" from="Microsoft" modified="false" />An object to compare with the current instance.</param>
+        <param name="comparer">
+          <attribution license="cc4" from="Microsoft" modified="false" />An object that provides custom rules for comparison.</param>
       </Docs>
     </Member>
     <Member MemberName="System.Collections.IStructuralEquatable.Equals">
         <Parameter Name="comparer" Type="System.Collections.IEqualityComparer" />
       </Parameters>
       <Docs>
-        <param name="other">To be added.</param>
-        <param name="comparer">To be added.</param>
-        <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Tuple`1" /> instance is cast to an <see cref="T:System.Collections.IStructuralEquatable" /> interface.</para>
+          <para>The <see cref="M:System.Collections.IEqualityComparer.Equals(System.Object,System.Object)" /> implementation is called only if <paramref name="other" /> is not null, and if it can be successfully cast (in C#) or converted (in Visual Basic) to a <see cref="T:System.Tuple`1" /> object whose single component is of the same type as the current instance. The method is passed the <see cref="P:System.Tuple`1.Item1" /> component of the current instance and the <see cref="P:System.Tuple`1.Item1" /> component of the <see cref="T:System.Tuple`1" /> object represented by the <paramref name="other" /> parameter.</para>
+        </remarks>
+        <summary>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>Returns a value that indicates whether the current <see cref="T:System.Tuple`1" /> object is equal to a specified object based on a specified comparison method.</para>
+        </summary>
+        <param name="other">
+          <attribution license="cc4" from="Microsoft" modified="false" />The object to compare with this instance.</param>
+        <param name="comparer">
+          <attribution license="cc4" from="Microsoft" modified="false" />An object that defines the method to use to evaluate whether the two objects are equal.</param>
       </Docs>
     </Member>
     <Member MemberName="System.Collections.IStructuralEquatable.GetHashCode">
         <Parameter Name="comparer" Type="System.Collections.IEqualityComparer" />
       </Parameters>
       <Docs>
-        <param name="comparer">To be added.</param>
-        <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Tuple`1" /> instance is cast to an <see cref="T:System.Collections.IStructuralEquatable" /> interface.</para>
+          <para>The method simply wraps a call to the <paramref name="comparer" /> object's <see cref="M:System.Collections.IEqualityComparer.GetHashCode(System.Object)" /> implementation.</para>
+          <para>The algorithm used to compute the hash code should return the same hash code for two <see cref="T:System.Tuple`1" /> objects that are considered to be equal.</para>
+        </remarks>
+        <summary>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>Calculates the hash code for the current <see cref="T:System.Tuple`1" /> object by using a specified computation method.</para>
+        </summary>
+        <param name="comparer">
+          <attribution license="cc4" from="Microsoft" modified="false" />An object whose <see cref="M:System.Collections.IEqualityComparer.GetHashCode(System.Object)" />  method calculates the hash code of the current <see cref="T:System.Tuple`1" /> object.</param>
       </Docs>
     </Member>
     <Member MemberName="System.IComparable.CompareTo">
         <Parameter Name="obj" Type="System.Object" />
       </Parameters>
       <Docs>
-        <param name="obj">To be added.</param>
-        <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Tuple`1" /> instance is cast to an <see cref="T:System.IComparable" /> interface.</para>
+          <para>This method provides the <see cref="M:System.IComparable.CompareTo(System.Object)" /> implementation for the <see cref="T:System.Tuple`1" /> class. Although the method can be called directly, it is most commonly called by the default overloads of collection sorting methods, such as <see cref="M:System.Array.Sort(System.Array)" /> and <see cref="M:System.Collections.SortedList.Add(System.Object,System.Object)" />, to order the members of a collection.</para>
+          <block subset="none" type="note">
+            <para>The <see cref="M:System.Tuple`1.System#IComparable#CompareTo(System.Object)" /> method is intended for use in sorting operations. It should not be used when the primary purpose of a comparison is to determine whether two objects are equal. To determine whether two objects are equal, call the <see cref="M:System.Tuple`1.Equals(System.Object)" /> method. </para>
+          </block>
+          <para>The <see cref="M:System.Tuple`1.System#IComparable#CompareTo(System.Object)" /> method uses the default object  comparer.</para>
+        </remarks>
+        <summary>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>Compares the current <see cref="T:System.Tuple`1" /> object to a specified object, and returns an integer that indicates whether the current object is before, after, or in the same position as the specified object in the sort order.</para>
+        </summary>
+        <param name="obj">
+          <attribution license="cc4" from="Microsoft" modified="false" />An object to compare with the current instance.</param>
       </Docs>
     </Member>
     <Member MemberName="System.ITuple.ToString">
       </ReturnValue>
       <Parameters />
       <Docs>
-        <summary>To be added.</summary>
         <returns>To be added.</returns>
-        <remarks>To be added.</remarks>
+        <remarks>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>The string returned by this method takes the form (Item1), where Item1 represents the value of the <see cref="P:System.Tuple`1.Item1" /> property. If the value of <see cref="P:System.Tuple`1.Item1" /> is null, it is represented as <see cref="F:System.String.Empty" />.</para>
+        </remarks>
+        <summary>
+          <attribution license="cc4" from="Microsoft" modified="false" />
+          <para>Returns a string that represents the value of this <see cref="T:System.Tuple`1" /> instance.</para>
+        </summary>
       </Docs>
     </Member>
   </Members>
-</Type>
+</Type>
\ No newline at end of file