18
<summary>Represents the path to a node in a tree.</summary>
19
<remarks>To be added.</remarks>
18
<summary>Represents the path to a node in a tree. In iOS this class is most commonly used to identify a row in a <see cref="T:MonoMac.UIKit.UITableView" />.</summary>
20
<para>The API used in iOS with <see cref="T:MonoMac.UIKit.UITableView" /> consists of a static method to create new objects and two properties. The <see cref="M:MonoMac.Foundation.NSIndexPath.FromRowSection(System.Int32,System.Int32)" /> method creates a new instance from row and section numbers. The properties <see cref="P:MonoMac.Foundation.NSIndexPath.Row" /> and <see cref="P:MonoMac.Foundation.NSIndexPath.Section" /> return the relevant values from populated instances.</para>
21
<para>This class has other uses beyond <see cref="T:MonoMac.UIKit.UITableView" />, which would involve using the rest of the class's properties and methods.</para>
23
<related type="sample" href="http://samples.xamarin.com/Samples/ByGuid?guid=8325839c-471c-4409-8d96-caefe8a95d4a">Example_Data</related>
24
<related type="sample" href="http://samples.xamarin.com/Samples/ByGuid?guid=23a2571b-45eb-4889-bb67-d88937cb68c1">monocatalog</related>
22
27
<Member MemberName=".ctor">
67
78
<AssemblyVersion>0.0.0.0</AssemblyVersion>
82
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
70
86
<Parameter Name="t" Type="MonoMac.Foundation.NSObjectFlag" />
73
89
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
74
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
90
<summary>Constructor to call on derived classes when the derived class has an [Export] constructor.</summary>
76
<para>This constructor should be called by derived classes when they completely construct the object in managed code and merely want the runtime to allocate and initialize the NSObject. This is required to implement the two-step initialization process that Objective-C uses, the first step is to perform the object allocation, the second step is to initialize the object. When you invoke the constructor that takes the NSObjectFlag.Empty you taking advatnage of a direct path that goes all the way up to NSObject to merely allocate the object's memory and bind the Objective-C and C# objects together. The actual initialization of the object is up to you.</para>
77
<para>This constructor is typically used by the binding generator to allocate the object, but prevent the actual initialization to take place. Once the allocation has taken place, the constructor has to initialize the object. With constructors generated by the binding generator this means that it manually invokes one of the "init" methods to initialize the object.</para>
78
<para>It is your responsability to completely initialize the object if you chain up using the NSObjectFlag.Empty path.</para>
79
<para>In general, if your constructors invokes the NSObjectFlag.Empty base implementation, then it should be calling an Objective-C init method. If this is not the case, you should instead chain to the proper constructor in your class. </para>
80
<para>The argument value is ignored and merely ensures that the only code that is executed is the construction phase is the basic NSObject allocation and runtime type registration. Typically the chaining would look like this:</para>
92
<para>This constructor should be called by derived classes when they are initialized using an [Export] attribute. The argument value is ignore, typically the chaining would look like this:</para>
84
// The NSObjectFlag merely allocates the object and registers the
85
// C# class with the Objective-C runtime if necessary, but no actual
86
// initXxx method is invoked, that is done later in the constructor
88
// This is taken from MonoMac's source code:
90
[Export ("initWithFrame:")]
91
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
93
// Invoke the init method now.
94
var initWithFrame = new Selector ("initWithFrame:").Handle;
96
Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_RectangleF (this.Handle, initWithFrame, frame);
98
Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_RectangleF (this.SuperHandle, initWithFrame, frame);
95
public class MyClass : BaseClass {
96
[Export ("initWithFoo:")]
97
public MyClass (string foo) : base (NSObjectFlag.Empty)
155
161
<Parameter Name="other" Type="MonoMac.Foundation.NSIndexPath" />
158
<param name="other">To be added.</param>
159
<summary>To be added.</summary>
160
<returns>To be added.</returns>
161
<remarks>To be added.</remarks>
164
<param name="other">Index-path to compare.</param>
165
<summary>Indicates the depth-first traversal order of this object compared to <paramref name="other" /> (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
166
<returns>NSComparisonResult { NSOrderedAscending = -1, NSOrderedSame = 0, NSOrderedDescending = 1 }</returns>
164
171
<Member MemberName="Create">
184
<param name="indexes">To be added.</param>
185
<summary>To be added.</summary>
186
<returns>To be added.</returns>
187
<remarks>To be added.</remarks>
191
<param name="indexes">Array of indexes to make the index-path.</param>
192
<summary>Create a new index-path object with the specified objects (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
190
199
<Member MemberName="Create">
210
<param name="indexes">To be added.</param>
211
<summary>To be added.</summary>
212
<returns>To be added.</returns>
213
<remarks>To be added.</remarks>
219
<param name="indexes">Array of indexes to make the index-path.</param>
220
<summary>Create a new index-path object with the specified objects (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
216
227
<Member MemberName="Equals">
227
238
<Parameter Name="obj" Type="System.Object" />
230
<param name="obj">To be added.</param>
231
<summary>To be added.</summary>
232
<returns>To be added.</returns>
233
<remarks>To be added.</remarks>
241
<param name="obj">Index-path to compare.</param>
242
<summary>Returns <see langword="true" /> if this object is equivalent to <paramref name="obj" />.</summary>
236
249
<Member MemberName="FromIndex">
252
265
<Parameter Name="index" Type="System.UInt32" />
255
<param name="index">To be added.</param>
256
<summary>To be added.</summary>
257
<returns>To be added.</returns>
258
<remarks>To be added.</remarks>
268
<param name="index">Object to place in the index-path.</param>
269
<summary>Create a new index-path object with the specified object (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
261
276
<Member MemberName="FromIndexes">
277
292
<Parameter Name="indexes" Type="System.UInt32[]" />
280
<param name="indexes">To be added.</param>
281
<summary>To be added.</summary>
282
<returns>To be added.</returns>
283
<remarks>To be added.</remarks>
286
<Member MemberName="FromRowSection">
287
<MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSIndexPath FromRowSection (int row, int section);" />
288
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSIndexPath FromRowSection(int32 row, int32 section) cil managed" />
289
<MemberType>Method</MemberType>
291
<AssemblyVersion>0.0.0.0</AssemblyVersion>
295
<AttributeName>MonoMac.Foundation.Export("indexPathForRow:inSection:")</AttributeName>
299
<ReturnType>MonoMac.Foundation.NSIndexPath</ReturnType>
302
<Parameter Name="row" Type="System.Int32" />
303
<Parameter Name="section" Type="System.Int32" />
306
<param name="row">To be added.</param>
307
<param name="section">To be added.</param>
308
<summary>To be added.</summary>
309
<returns>To be added.</returns>
310
<remarks>To be added.</remarks>
295
<param name="indexes">Array of indexes to make the index-path.</param>
296
<summary>Create a new index-path object with the specified objects (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
313
303
<Member MemberName="GetHashCode">
325
<summary>To be added.</summary>
326
<returns>To be added.</returns>
327
<remarks>To be added.</remarks>
315
<summary>Generates a hash code for the current instance.</summary>
316
<returns>A int containing the hash code for this instance.</returns>
317
<remarks>The algorithm used to generate the hash code is unspecified.</remarks>
330
320
<Member MemberName="GetIndexes">
342
<summary>To be added.</summary>
343
<returns>To be added.</returns>
344
<remarks>To be added.</remarks>
332
<summary>Copies the objects contained in the index-path to an array (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
347
339
<Member MemberName="IndexAtPosition">
363
355
<Parameter Name="position" Type="System.Int32" />
366
<param name="position">To be added.</param>
367
<summary>To be added.</summary>
368
<returns>To be added.</returns>
369
<remarks>To be added.</remarks>
358
<param name="position">Position of index to return.</param>
359
<summary>Return the index at the given <paramref name="position" /> in the index-path (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
372
366
<Member MemberName="IndexPathByAddingIndex">
388
382
<Parameter Name="index" Type="System.UInt32" />
391
<param name="index">To be added.</param>
392
<summary>To be added.</summary>
393
<returns>To be added.</returns>
394
<remarks>To be added.</remarks>
385
<param name="index">Index to be appended.</param>
386
<summary>Returns a new index-path containing those in this object plus the new <paramref name="index" /> (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
397
393
<Member MemberName="IndexPathByRemovingLastIndex">
414
<summary>To be added.</summary>
415
<returns>To be added.</returns>
416
<remarks>To be added.</remarks>
410
<summary>Returns a new index-path with the last one removed (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
419
417
<Member MemberName="Length">
432
430
<ReturnType>System.Int32</ReturnType>
435
<summary>To be added.</summary>
436
<value>To be added.</value>
437
<remarks>To be added.</remarks>
440
<Member MemberName="Row">
441
<MemberSignature Language="C#" Value="public virtual int Row { get; }" />
442
<MemberSignature Language="ILAsm" Value=".property instance int32 Row" />
443
<MemberType>Property</MemberType>
445
<AssemblyVersion>0.0.0.0</AssemblyVersion>
449
<AttributeName>get: MonoMac.Foundation.Export("row")</AttributeName>
453
<ReturnType>System.Int32</ReturnType>
456
<summary>To be added.</summary>
457
<value>To be added.</value>
458
<remarks>To be added.</remarks>
461
<Member MemberName="Section">
462
<MemberSignature Language="C#" Value="public virtual int Section { get; }" />
463
<MemberSignature Language="ILAsm" Value=".property instance int32 Section" />
464
<MemberType>Property</MemberType>
466
<AssemblyVersion>0.0.0.0</AssemblyVersion>
470
<AttributeName>get: MonoMac.Foundation.Export("section")</AttributeName>
474
<ReturnType>System.Int32</ReturnType>
477
<summary>To be added.</summary>
478
<value>To be added.</value>
479
<remarks>To be added.</remarks>
433
<summary>The number of indexes in the index-path (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>