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

« back to all changes in this revision

Viewing changes to external/monomac/docs/en/MonoMac.AVFoundation/AVCaptureDevice+Notifications.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:
 
1
<Type Name="AVCaptureDevice+Notifications" FullName="MonoMac.AVFoundation.AVCaptureDevice+Notifications">
 
2
  <TypeSignature Language="C#" Value="public static class AVCaptureDevice.Notifications" />
 
3
  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi abstract sealed beforefieldinit AVCaptureDevice/Notifications extends System.Object" />
 
4
  <AssemblyInfo>
 
5
    <AssemblyName>MonoMac</AssemblyName>
 
6
    <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
7
  </AssemblyInfo>
 
8
  <Base>
 
9
    <BaseTypeName>System.Object</BaseTypeName>
 
10
  </Base>
 
11
  <Interfaces />
 
12
  <Docs>
 
13
    <summary>
 
14
      <para>Notification posted by the <see cref="T:MonoMac.AVFoundation.AVCaptureDevice" /> class.</para>
 
15
    </summary>
 
16
    <remarks>
 
17
      <para>This is a static class which contains various helper methods that allow developers to observe events posted in the iOS notification hub (<see cref="T:MonoTouch.Foundation.NSNotificationCenter" />).</para>
 
18
      <para>The methods defined in this class post events invoke the provided method or lambda with a <see cref="T:MonoTouch.Foundation.NSNotificationEventArgs" /> parameter which contains strongly typed properties for the notification arguments.</para>
 
19
    </remarks>
 
20
  </Docs>
 
21
  <Members>
 
22
    <Member MemberName="ObserveSubjectAreaDidChange">
 
23
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveSubjectAreaDidChange (EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt; handler);" />
 
24
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveSubjectAreaDidChange(class System.EventHandler`1&lt;class MonoMac.Foundation.NSNotificationEventArgs&gt; handler) cil managed" />
 
25
      <MemberType>Method</MemberType>
 
26
      <AssemblyInfo>
 
27
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
28
      </AssemblyInfo>
 
29
      <ReturnValue>
 
30
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
31
      </ReturnValue>
 
32
      <Parameters>
 
33
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt;" />
 
34
      </Parameters>
 
35
      <Docs>
 
36
        <param name="handler">Method to invoke when the notification is posted.</param>
 
37
        <summary>Registers a method to be notified when the AVCaptureDeviceSubjectAreaDidChangeNotification notification is posted.</summary>
 
38
        <returns>
 
39
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
40
        </returns>
 
41
        <remarks>
 
42
          <para>The following example shows how you can use this method in your code</para>
 
43
          <example>
 
44
            <code lang="c#">
 
45
//
 
46
// Lambda style
 
47
//
 
48
 
 
49
// listening
 
50
notification = AVCaptureDevice.Notifications.ObserveObserveSubjectAreaDidChange ((sender, args) =&gt; {
 
51
    /* Access strongly typed args */
 
52
    Console.WriteLine ("Notification: {0}", args.Notification);
 
53
});
 
54
 
 
55
// To stop listening:
 
56
notification.Dispose ();
 
57
 
 
58
//
 
59
//Method style
 
60
//
 
61
NSObject notification;
 
62
void Callback (object sender, ObserveSubjectAreaDidChange args)
 
63
{
 
64
    // Access strongly typed args
 
65
    Console.WriteLine ("Notification: {0}", args.Notification);
 
66
}
 
67
 
 
68
void Setup ()
 
69
{
 
70
    notification = AVCaptureDevice.Notifications.ObserveObserveSubjectAreaDidChange (Callback);
 
71
}
 
72
 
 
73
void Teardown ()
 
74
{
 
75
    notification.Dispose ();
 
76
}</code>
 
77
          </example>
 
78
        </remarks>
 
79
      </Docs>
 
80
    </Member>
 
81
    <Member MemberName="ObserveWasConnected">
 
82
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveWasConnected (EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt; handler);" />
 
83
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveWasConnected(class System.EventHandler`1&lt;class MonoMac.Foundation.NSNotificationEventArgs&gt; handler) cil managed" />
 
84
      <MemberType>Method</MemberType>
 
85
      <AssemblyInfo>
 
86
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
87
      </AssemblyInfo>
 
88
      <ReturnValue>
 
89
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
90
      </ReturnValue>
 
91
      <Parameters>
 
92
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt;" />
 
93
      </Parameters>
 
94
      <Docs>
 
95
        <param name="handler">Method to invoke when the notification is posted.</param>
 
96
        <summary>Registers a method to be notified when the AVCaptureDeviceWasConnectedNotification notification is posted.</summary>
 
97
        <returns>
 
98
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
99
        </returns>
 
100
        <remarks>
 
101
          <para>The following example shows how you can use this method in your code</para>
 
102
          <example>
 
103
            <code lang="c#">
 
104
//
 
105
// Lambda style
 
106
//
 
107
 
 
108
// listening
 
109
notification = AVCaptureDevice.Notifications.ObserveObserveWasConnected ((sender, args) =&gt; {
 
110
    /* Access strongly typed args */
 
111
    Console.WriteLine ("Notification: {0}", args.Notification);
 
112
});
 
113
 
 
114
// To stop listening:
 
115
notification.Dispose ();
 
116
 
 
117
//
 
118
//Method style
 
119
//
 
120
NSObject notification;
 
121
void Callback (object sender, ObserveWasConnected args)
 
122
{
 
123
    // Access strongly typed args
 
124
    Console.WriteLine ("Notification: {0}", args.Notification);
 
125
}
 
126
 
 
127
void Setup ()
 
128
{
 
129
    notification = AVCaptureDevice.Notifications.ObserveObserveWasConnected (Callback);
 
130
}
 
131
 
 
132
void Teardown ()
 
133
{
 
134
    notification.Dispose ();
 
135
}</code>
 
136
          </example>
 
137
        </remarks>
 
138
      </Docs>
 
139
    </Member>
 
140
    <Member MemberName="ObserveWasDisconnected">
 
141
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObserveWasDisconnected (EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt; handler);" />
 
142
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObserveWasDisconnected(class System.EventHandler`1&lt;class MonoMac.Foundation.NSNotificationEventArgs&gt; handler) cil managed" />
 
143
      <MemberType>Method</MemberType>
 
144
      <AssemblyInfo>
 
145
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
146
      </AssemblyInfo>
 
147
      <ReturnValue>
 
148
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
149
      </ReturnValue>
 
150
      <Parameters>
 
151
        <Parameter Name="handler" Type="System.EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt;" />
 
152
      </Parameters>
 
153
      <Docs>
 
154
        <param name="handler">Method to invoke when the notification is posted.</param>
 
155
        <summary>Registers a method to be notified when the AVCaptureDeviceWasDisconnectedNotification notification is posted.</summary>
 
156
        <returns>
 
157
          <para>The returned NSObject represents the registered notification.   Either call Dispose on the object to stop receiving notifications, or pass it to <see cref="M:MonoTouch.Foundation.NSNotification.RemoveObserver" /></para>
 
158
        </returns>
 
159
        <remarks>
 
160
          <para>The following example shows how you can use this method in your code</para>
 
161
          <example>
 
162
            <code lang="c#">
 
163
//
 
164
// Lambda style
 
165
//
 
166
 
 
167
// listening
 
168
notification = AVCaptureDevice.Notifications.ObserveObserveWasDisconnected ((sender, args) =&gt; {
 
169
    /* Access strongly typed args */
 
170
    Console.WriteLine ("Notification: {0}", args.Notification);
 
171
});
 
172
 
 
173
// To stop listening:
 
174
notification.Dispose ();
 
175
 
 
176
//
 
177
//Method style
 
178
//
 
179
NSObject notification;
 
180
void Callback (object sender, ObserveWasDisconnected args)
 
181
{
 
182
    // Access strongly typed args
 
183
    Console.WriteLine ("Notification: {0}", args.Notification);
 
184
}
 
185
 
 
186
void Setup ()
 
187
{
 
188
    notification = AVCaptureDevice.Notifications.ObserveObserveWasDisconnected (Callback);
 
189
}
 
190
 
 
191
void Teardown ()
 
192
{
 
193
    notification.Dispose ();
 
194
}</code>
 
195
          </example>
 
196
        </remarks>
 
197
      </Docs>
 
198
    </Member>
 
199
  </Members>
 
200
</Type>