65
65
<param name="x">Unused sentinel value, pass NSObjectFlag.Empty.</param>
66
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
66
<summary>Constructor to call on derived classes when the derived class has an [Export] constructor.</summary>
68
<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>
69
<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>
70
<para>It is your responsability to completely initialize the object if you chain up using the NSObjectFlag.Empty path.</para>
71
<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>
72
<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>
68
<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>
76
// The NSObjectFlag merely allocates the object and registers the
77
// C# class with the Objective-C runtime if necessary, but no actual
78
// initXxx method is invoked, that is done later in the constructor
80
// This is taken from MonoMac's source code:
82
[Export ("initWithFrame:")]
83
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
85
// Invoke the init method now.
86
var initWithFrame = new Selector ("initWithFrame:").Handle;
88
Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_RectangleF (this.Handle, initWithFrame, frame);
90
Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_RectangleF (this.SuperHandle, initWithFrame, frame);
71
public class MyClass : BaseClass {
72
[Export ("initWithFoo:")]
73
public MyClass (string foo) : base (NSObjectFlag.Empty)
226
211
immediately to the caller.
216
// Invoked in response to a button clicked on the UI.
217
void StartDownload ()
219
status.Text = "Downloading file...";
220
ThreadPool.QueueUserWorkItem (BackgroundDownload);
223
// This is the background helper
224
BackgroundDownload ()
226
var wc = new WebClient ();
227
wc.DownloadFile (myUrl, "/tmp/largeFile.txt");
229
// When the download is complete, notify the UI
230
BeginInvokeOnMainThread (delegate {
231
status.Text = "Download has been completed";
298
305
<param name="binding">To be added.</param>
299
306
<param name="observable">To be added.</param>
300
307
<param name="keyPath">To be added.</param>
301
<param name="options">To be added.</param>
308
<param name="options">
309
<para>Options for the binding.</para>
310
<para tool="nullallowed">This parameter can be <see langword="null" />.</para>
302
312
<summary>To be added.</summary>
303
313
<remarks>To be added.</remarks>
389
399
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
392
<summary>To be added.</summary>
393
<value>To be added.</value>
402
<summary>Represents the value associated with the constant NSKeyValueChangeIndexesKey</summary>
394
405
<remarks>To be added.</remarks>
405
416
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
408
<summary>To be added.</summary>
409
<value>To be added.</value>
419
<summary>Represents the value associated with the constant NSKeyValueChangeKindKey</summary>
410
422
<remarks>To be added.</remarks>
421
433
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
424
<summary>To be added.</summary>
425
<value>To be added.</value>
436
<summary>Represents the value associated with the constant NSKeyValueChangeNewKey</summary>
426
439
<remarks>To be added.</remarks>
437
450
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
440
<summary>Notification constant for ChangeNotificati</summary>
453
<summary>Represents the value associated with the constant NSKeyValueChangeNotificationIsPriorKey</summary>
441
454
<value>NSString constant, should be used as a token to NSNotificationCenter.</value>
443
456
<para id="tool-remark">This constant can be used with the <see cref="T:MonoMac.Foundation.NSNotificationCenter" /> to register a listener for this notification.</para>
472
485
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
475
<summary>To be added.</summary>
476
<value>To be added.</value>
488
<summary>Represents the value associated with the constant NSKeyValueChangeOldKey</summary>
477
491
<remarks>To be added.</remarks>
638
652
<remarks>To be added.</remarks>
655
<Member MemberName="DebugDescription">
656
<MemberSignature Language="C#" Value="public virtual string DebugDescription { get; }" />
657
<MemberSignature Language="ILAsm" Value=".property instance string DebugDescription" />
658
<MemberType>Property</MemberType>
660
<AssemblyVersion>0.0.0.0</AssemblyVersion>
664
<AttributeName>get: MonoMac.Foundation.Export("debugDescription")</AttributeName>
668
<ReturnType>System.String</ReturnType>
671
<summary>To be added.</summary>
672
<value>To be added.</value>
673
<remarks>To be added.</remarks>
676
<Member MemberName="Description">
677
<MemberSignature Language="C#" Value="public virtual string Description { get; }" />
678
<MemberSignature Language="ILAsm" Value=".property instance string Description" />
679
<MemberType>Property</MemberType>
681
<AssemblyVersion>0.0.0.0</AssemblyVersion>
685
<AttributeName>get: MonoMac.Foundation.Export("description")</AttributeName>
689
<ReturnType>System.String</ReturnType>
692
<summary>To be added.</summary>
693
<value>To be added.</value>
694
<remarks>To be added.</remarks>
641
697
<Member MemberName="DidChange">
642
698
<MemberSignature Language="C#" Value="public virtual void DidChange (MonoMac.Foundation.NSKeyValueChange changeKind, MonoMac.Foundation.NSIndexSet indexes, MonoMac.Foundation.NSString forKey);" />
643
699
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void DidChange(valuetype MonoMac.Foundation.NSKeyValueChange changeKind, class MonoMac.Foundation.NSIndexSet indexes, class MonoMac.Foundation.NSString forKey) cil managed" />
733
<summary>Releases the resourced used by the NSObject object.</summary>
789
<summary>Releases the resources used by the NSObject object.</summary>
735
791
<para>The Dispose method releases the resources used by the NSObject class.</para>
736
792
<para>Calling the Dispose method when you are finished using the NSObject ensures that all external resources used by this managed object are released as soon as possible. Once you have invoked the Dispose method, the object is no longer useful and you should no longer make any calls to it. For more information on releasing resources see ``Cleaning up Unmananaged Resources'' at http://msdn.microsoft.com/en-us/library/498928w2.aspx</para>
754
810
<param name="disposing">
755
811
<para>If set to <see langword="true" />, the method is invoked directly and will dispose manage and unmanaged resources; If set to <see langword="false" /> the method is being called by the garbage collector finalizer and should only release unmanaged resources.</para>
757
<summary>Releases the resourced used by the NSObject object.</summary>
813
<summary>Releases the resources used by the NSObject object.</summary>
759
815
<para>This Dispose method releases the resources used by the NSObject class.</para>
760
816
<para>This method is called by both the Dispose() method and the object finalizer (Finalize). When invoked by the Dispose method, the parameter disposting <paramref name="disposing" /> is set to <see langword="true" /> and any managed object references that this object holds are also disposed or released; when invoked by the object finalizer, on the finalizer thread the value is set to <see langword="false" />. </para>
1127
1183
<Member MemberName="MonoMacAssembly">
1128
<MemberSignature Language="C#" Value="public static System.Reflection.Assembly MonoMacAssembly;" />
1129
<MemberSignature Language="ILAsm" Value=".field public static class System.Reflection.Assembly MonoMacAssembly" />
1184
<MemberSignature Language="C#" Value="public static readonly System.Reflection.Assembly MonoMacAssembly;" />
1185
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Reflection.Assembly MonoMacAssembly" />
1130
1186
<MemberType>Field</MemberType>
1132
1188
<AssemblyVersion>0.0.0.0</AssemblyVersion>
1218
1274
<Member MemberName="PerformSelector">
1219
<MemberSignature Language="C#" Value="public virtual void PerformSelector (MonoMac.ObjCRuntime.Selector sel, MonoMac.Foundation.NSObject obj, float delay);" />
1220
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void PerformSelector(class MonoMac.ObjCRuntime.Selector sel, class MonoMac.Foundation.NSObject obj, float32 delay) cil managed" />
1275
<MemberSignature Language="C#" Value="public virtual void PerformSelector (MonoMac.ObjCRuntime.Selector sel, MonoMac.Foundation.NSObject obj, double delay);" />
1276
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void PerformSelector(class MonoMac.ObjCRuntime.Selector sel, class MonoMac.Foundation.NSObject obj, float64 delay) cil managed" />
1221
1277
<MemberType>Method</MemberType>
1223
1279
<AssemblyVersion>0.0.0.0</AssemblyVersion>
1234
1290
<Parameter Name="sel" Type="MonoMac.ObjCRuntime.Selector" />
1235
1291
<Parameter Name="obj" Type="MonoMac.Foundation.NSObject" />
1236
<Parameter Name="delay" Type="System.Single" />
1292
<Parameter Name="delay" Type="System.Double" />
1239
1295
<param name="sel">To be added.</param>
1294
1350
<remarks>To be added.</remarks>
1353
<Member MemberName="SetDefaultPlaceholder">
1354
<MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject SetDefaultPlaceholder (MonoMac.Foundation.NSObject placeholder, MonoMac.Foundation.NSObject marker, string binding);" />
1355
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject SetDefaultPlaceholder(class MonoMac.Foundation.NSObject placeholder, class MonoMac.Foundation.NSObject marker, string binding) cil managed" />
1356
<MemberType>Method</MemberType>
1358
<AssemblyVersion>0.0.0.0</AssemblyVersion>
1362
<AttributeName>MonoMac.Foundation.Export("setDefaultPlaceholder:forMarker:withBinding:")</AttributeName>
1366
<ReturnType>MonoMac.Foundation.NSObject</ReturnType>
1369
<Parameter Name="placeholder" Type="MonoMac.Foundation.NSObject" />
1370
<Parameter Name="marker" Type="MonoMac.Foundation.NSObject" />
1371
<Parameter Name="binding" Type="System.String" />
1374
<param name="placeholder">To be added.</param>
1375
<param name="marker">To be added.</param>
1376
<param name="binding">To be added.</param>
1377
<summary>To be added.</summary>
1378
<returns>To be added.</returns>
1379
<remarks>To be added.</remarks>
1297
1382
<Member MemberName="SetNativeField">
1298
1383
<MemberSignature Language="C#" Value="public void SetNativeField (string name, MonoMac.Foundation.NSObject value);" />
1299
1384
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetNativeField(string name, class MonoMac.Foundation.NSObject value) cil managed" />
1480
1565
<remarks>To be added.</remarks>
1568
<Member MemberName="ToString">
1569
<MemberSignature Language="C#" Value="public override string ToString ();" />
1570
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
1571
<MemberType>Method</MemberType>
1573
<AssemblyVersion>0.0.0.0</AssemblyVersion>
1576
<ReturnType>System.String</ReturnType>
1580
<summary>Returns a string representation of the value of the current instance.</summary>
1483
1587
<Member MemberName="Unbind">
1484
1588
<MemberSignature Language="C#" Value="public virtual void Unbind (string binding);" />
1485
1589
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Unbind(string binding) cil managed" />