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

« back to all changes in this revision

Viewing changes to external/monomac/docs/en/MonoMac.AVFoundation/AVCaptureInput+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="AVCaptureInput+Notifications" FullName="MonoMac.AVFoundation.AVCaptureInput+Notifications">
 
2
  <TypeSignature Language="C#" Value="public static class AVCaptureInput.Notifications" />
 
3
  <TypeSignature Language="ILAsm" Value=".class nested public auto ansi abstract sealed beforefieldinit AVCaptureInput/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.AVCaptureInput" /> 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="ObservePortFormatDescriptionDidChange">
 
23
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject ObservePortFormatDescriptionDidChange (EventHandler&lt;MonoMac.Foundation.NSNotificationEventArgs&gt; handler);" />
 
24
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject ObservePortFormatDescriptionDidChange(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 AVCaptureInputPortFormatDescriptionDidChangeNotification 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 = AVCaptureInput.Notifications.ObserveObservePortFormatDescriptionDidChange ((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, ObservePortFormatDescriptionDidChange args)
 
63
{
 
64
    // Access strongly typed args
 
65
    Console.WriteLine ("Notification: {0}", args.Notification);
 
66
}
 
67
 
 
68
void Setup ()
 
69
{
 
70
    notification = AVCaptureInput.Notifications.ObserveObservePortFormatDescriptionDidChange (Callback);
 
71
}
 
72
 
 
73
void Teardown ()
 
74
{
 
75
    notification.Dispose ();
 
76
}</code>
 
77
          </example>
 
78
        </remarks>
 
79
      </Docs>
 
80
    </Member>
 
81
  </Members>
 
82
</Type>