summaryrefslogtreecommitdiff
path: root/docs/Xamarin.Forms.Core/Xamarin.Forms/Command`1.xml
blob: e212dbc2375da9a44432618095aa4961761183ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<Type Name="Command&lt;T&gt;" FullName="Xamarin.Forms.Command&lt;T&gt;">
  <TypeSignature Language="C#" Value="public sealed class Command&lt;T&gt; : Xamarin.Forms.Command" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit Command`1&lt;T&gt; extends Xamarin.Forms.Command" />
  <AssemblyInfo>
    <AssemblyName>Xamarin.Forms.Core</AssemblyName>
    <AssemblyVersion>1.0.0.0</AssemblyVersion>
    <AssemblyVersion>1.1.0.0</AssemblyVersion>
    <AssemblyVersion>1.2.0.0</AssemblyVersion>
    <AssemblyVersion>1.3.0.0</AssemblyVersion>
    <AssemblyVersion>1.4.0.0</AssemblyVersion>
    <AssemblyVersion>1.5.0.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <TypeParameters>
    <TypeParameter Name="T" />
  </TypeParameters>
  <Base>
    <BaseTypeName>Xamarin.Forms.Command</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <typeparam name="T">The Type of the parameter,</typeparam>
    <summary>Defines an <see cref="T:System.Windows.Input.ICommand" /> implementation wrapping a generic Action&lt;T&gt;.</summary>
    <remarks>
      <para>
              The following example creates a new Command and set it to a button.
              </para>
      <example language="C#">
        <code lang="C#"><![CDATA[
var command = new Command<string> (s => Debug.WriteLine ("Command executed: {0}", s));
var button = new Button {
  Text = "Hit me to execute the command",
  Command = command,
  CommandParameter = "button0",
};
]]></code>
      </example>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public Command (Action&lt;T&gt; execute);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Action`1&lt;!T&gt; execute) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
        <AssemblyVersion>1.1.0.0</AssemblyVersion>
        <AssemblyVersion>1.2.0.0</AssemblyVersion>
        <AssemblyVersion>1.3.0.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="execute" Type="System.Action&lt;T&gt;" />
      </Parameters>
      <Docs>
        <param name="execute">An Action to execute when the Command is executed.</param>
        <summary>Initializes a new instance of the Command class.</summary>
        <remarks>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public Command (Action&lt;T&gt; execute, Func&lt;T,bool&gt; canExecute);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Action`1&lt;!T&gt; execute, class System.Func`2&lt;!T, bool&gt; canExecute) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
        <AssemblyVersion>1.1.0.0</AssemblyVersion>
        <AssemblyVersion>1.2.0.0</AssemblyVersion>
        <AssemblyVersion>1.3.0.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="execute" Type="System.Action&lt;T&gt;" />
        <Parameter Name="canExecute" Type="System.Func&lt;T,System.Boolean&gt;" />
      </Parameters>
      <Docs>
        <param name="execute">An Action to execute when the Command is executed.</param>
        <param name="canExecute">A <see cref="T:System.Func&lt;T,bool&gt;" /> indicating if the Command can be executed.</param>
        <summary>Initializes a new instance of the Command class.</summary>
        <remarks>
        </remarks>
      </Docs>
    </Member>
  </Members>
</Type>