Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System / compmod / system / codedom / CodeDelegateInvokeExpression.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="CodeDelegateInvokeExpression.cs" company="Microsoft">
3 // 
4 // <OWNER>Microsoft</OWNER>
5 //     Copyright (c) Microsoft Corporation.  All rights reserved.
6 // </copyright>                                                                
7 //------------------------------------------------------------------------------
8
9 namespace System.CodeDom {
10
11     using System.Diagnostics;
12     using System;
13     using Microsoft.Win32;
14     using System.Collections;
15     using System.Runtime.InteropServices;
16
17     /// <devdoc>
18     ///    <para>
19     ///       Represents an
20     ///       expression that invokes a delegate.
21     ///    </para>
22     /// </devdoc>
23     [
24         ClassInterface(ClassInterfaceType.AutoDispatch),
25         ComVisible(true),
26         Serializable,
27     ]
28     public class CodeDelegateInvokeExpression : CodeExpression {
29         private CodeExpression targetObject;
30         private CodeExpressionCollection parameters = new CodeExpressionCollection();
31
32         /// <devdoc>
33         ///    <para>
34         ///       Initializes a new instance of <see cref='System.CodeDom.CodeDelegateInvokeExpression'/>.
35         ///    </para>
36         /// </devdoc>
37         public CodeDelegateInvokeExpression() {
38         }
39
40         /// <devdoc>
41         ///    <para>
42         ///       Initializes a new instance of <see cref='System.CodeDom.CodeDelegateInvokeExpression'/>.
43         ///    </para>
44         /// </devdoc>
45         public CodeDelegateInvokeExpression(CodeExpression targetObject) {
46             TargetObject = targetObject;
47         }
48
49         /// <devdoc>
50         ///    <para>
51         ///       Initializes a new instance of <see cref='System.CodeDom.CodeDelegateInvokeExpression'/>
52         ///       .
53         ///    </para>
54         /// </devdoc>
55         public CodeDelegateInvokeExpression(CodeExpression targetObject, params CodeExpression[] parameters) {
56             TargetObject = targetObject;
57             Parameters.AddRange(parameters);
58         }
59
60         /// <devdoc>
61         ///    <para>
62         ///       The
63         ///       delegate's target object.
64         ///    </para>
65         /// </devdoc>
66         public CodeExpression TargetObject {
67             get {
68                 return targetObject;
69             }
70             set {
71                 this.targetObject = value;
72             }
73         }
74
75         /// <devdoc>
76         ///    <para>
77         ///       The
78         ///       delegate parameters.
79         ///    </para>
80         /// </devdoc>
81         public CodeExpressionCollection Parameters {
82             get {
83                 return parameters;
84             }
85         }
86     }
87 }