~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/monomac/docs/en/MonoMac.Foundation/NSDate.xml

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
        <Attribute>
31
31
          <AttributeName>MonoMac.Foundation.Export("init")</AttributeName>
32
32
        </Attribute>
 
33
        <Attribute>
 
34
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
35
        </Attribute>
33
36
      </Attributes>
34
37
      <Parameters />
35
38
      <Docs>
49
52
        <Attribute>
50
53
          <AttributeName>MonoMac.Foundation.Export("initWithCoder:")</AttributeName>
51
54
        </Attribute>
 
55
        <Attribute>
 
56
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
57
        </Attribute>
52
58
      </Attributes>
53
59
      <Parameters>
54
60
        <Parameter Name="coder" Type="MonoMac.Foundation.NSCoder" />
66
72
      <AssemblyInfo>
67
73
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
68
74
      </AssemblyInfo>
 
75
      <Attributes>
 
76
        <Attribute>
 
77
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
78
        </Attribute>
 
79
      </Attributes>
69
80
      <Parameters>
70
81
        <Parameter Name="t" Type="MonoMac.Foundation.NSObjectFlag" />
71
82
      </Parameters>
72
83
      <Docs>
73
84
        <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>
 
85
        <summary>Constructor to call on derived classes when the derived class has an [Export] constructor.</summary>
75
86
        <remarks>
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>
 
87
          <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>
81
88
          <example>
82
89
            <code lang="C#">
83
 
//
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
87
 
//
88
 
// This is taken from MonoMac's source code:
89
 
//
90
 
[Export ("initWithFrame:")]
91
 
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
92
 
{
93
 
// Invoke the init method now.
94
 
        var initWithFrame = new Selector ("initWithFrame:").Handle;
95
 
        if (IsDirectBinding)
96
 
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_RectangleF (this.Handle, initWithFrame, frame);
97
 
        else
98
 
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_RectangleF (this.SuperHandle, initWithFrame, frame);
99
 
}
 
90
public class MyClass : BaseClass {
 
91
    [Export ("initWithFoo:")]
 
92
    public MyClass (string foo) : base (NSObjectFlag.Empty)
 
93
    {
 
94
        ...
 
95
    }
100
96
</code>
101
97
          </example>
102
98
        </remarks>
109
105
      <AssemblyInfo>
110
106
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
111
107
      </AssemblyInfo>
 
108
      <Attributes>
 
109
        <Attribute>
 
110
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
111
        </Attribute>
 
112
      </Attributes>
112
113
      <Parameters>
113
114
        <Parameter Name="handle" Type="System.IntPtr" />
114
115
      </Parameters>
161
162
        <remarks>Each MonoMac class mirrors an unmanaged Objective-C class.   This value contains the pointer to the Objective-C class, it is similar to calling objc_getClass with the object name.</remarks>
162
163
      </Docs>
163
164
    </Member>
164
 
    <Member MemberName="Description">
165
 
      <MemberSignature Language="C#" Value="public virtual string Description { get; }" />
166
 
      <MemberSignature Language="ILAsm" Value=".property instance string Description" />
167
 
      <MemberType>Property</MemberType>
168
 
      <AssemblyInfo>
169
 
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
170
 
      </AssemblyInfo>
171
 
      <Attributes>
172
 
        <Attribute>
173
 
          <AttributeName>get: MonoMac.Foundation.Export("description")</AttributeName>
174
 
        </Attribute>
175
 
      </Attributes>
176
 
      <ReturnValue>
177
 
        <ReturnType>System.String</ReturnType>
178
 
      </ReturnValue>
179
 
      <Docs>
180
 
        <summary>To be added.</summary>
181
 
        <value>To be added.</value>
182
 
        <remarks>To be added.</remarks>
183
 
      </Docs>
184
 
    </Member>
185
165
    <Member MemberName="DistantFuture">
186
166
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSDate DistantFuture { get; }" />
187
167
      <MemberSignature Language="ILAsm" Value=".property class MonoMac.Foundation.NSDate DistantFuture" />
334
314
        <Parameter Name="d" Type="MonoMac.Foundation.NSDate" />
335
315
      </Parameters>
336
316
      <Docs>
337
 
        <param name="d">To be added.</param>
338
 
        <summary>To be added.</summary>
339
 
        <returns>To be added.</returns>
340
 
        <remarks>To be added.</remarks>
 
317
        <param name="d">An NSDate.</param>
 
318
        <summary>Converts an NSDate value to an equivalent DateTime value.</summary>
 
319
        <returns>A DateTime.</returns>
 
320
        <remarks>
 
321
        </remarks>
341
322
      </Docs>
342
323
    </Member>
343
324
    <Member MemberName="op_Implicit">
354
335
        <Parameter Name="dt" Type="System.DateTime" />
355
336
      </Parameters>
356
337
      <Docs>
357
 
        <param name="dt">To be added.</param>
358
 
        <summary>To be added.</summary>
359
 
        <returns>To be added.</returns>
360
 
        <remarks>To be added.</remarks>
 
338
        <param name="dt">A DateTime.</param>
 
339
        <summary>Converts a DateTime value to an equivalent NSDate value.</summary>
 
340
        <returns>A NSDate.</returns>
 
341
        <remarks>NSDate does not have the concept of a date with an unspecified timezone (aka a DateTime with Kind set to Unspecified). In this case the date value is converted as if it were a local date.</remarks>
361
342
      </Docs>
362
343
    </Member>
363
344
    <Member MemberName="SecondsSinceReferenceDate">
393
374
      </ReturnValue>
394
375
      <Parameters />
395
376
      <Docs>
396
 
        <summary>To be added.</summary>
397
 
        <returns>To be added.</returns>
398
 
        <remarks>To be added.</remarks>
 
377
        <summary>Returns a string representation of the value of the current instance.</summary>
 
378
        <returns>
 
379
        </returns>
 
380
        <remarks>
 
381
        </remarks>
399
382
      </Docs>
400
383
    </Member>
401
384
  </Members>