File: ExpressionContext.xml

package info (click to toggle)
mono-reference-assemblies 3.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 604,240 kB
  • ctags: 625,505
  • sloc: cs: 3,967,741; xml: 2,793,081; ansic: 418,042; java: 60,435; sh: 14,833; makefile: 11,576; sql: 7,956; perl: 1,467; cpp: 1,446; yacc: 1,203; python: 598; asm: 422; sed: 16; php: 1
file content (170 lines) | stat: -rw-r--r-- 10,099 bytes parent folder | download | duplicates (8)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ExpressionContext" FullName="System.ComponentModel.Design.Serialization.ExpressionContext">
  <TypeSignature Language="C#" Value="public sealed class ExpressionContext" />
  <AssemblyInfo>
    <AssemblyName>System.Design</AssemblyName>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>An <see cref="T:System.ComponentModel.Design.Serialization.ExpressionContext" /> is placed on the context stack and contains the most relevant expression during serialization. The following C# code demonstrates an assignment.</para>
      <code>button1.Text = "Hello";</code>
      <para>During serialization, several serializers are responsible for creating this single statement. One of those serializers is responsible for creating "Hello". There are times when that serializer may need to know the context in which it is creating its expression. In the previous example, this context is not needed. The following C# code shows a situation in which knowledge of the context is necessary.</para>
      <code>button1.Text = rm.GetString("button1_Text");</code>
      <para>In this case, the serializer responsible for creating the resource expression needs to be informed of the names of the target objects. The <see cref="T:System.ComponentModel.Design.Serialization.ExpressionContext" /> class can be used for this. As each serializer creates an expression and invokes a serializer to handle a smaller part of the statement as a whole, the serializer pushes an expression context on the context stack. Each expression context has a parent property that locates the next expression context on the stack. This provides a convenient traversal capability.</para>
    </remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Provides a means of passing context state among serializers. This class cannot be inherited.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public ExpressionContext (System.CodeDom.CodeExpression expression, Type expressionType, object owner);" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="expression" Type="System.CodeDom.CodeExpression" />
        <Parameter Name="expressionType" Type="System.Type" />
        <Parameter Name="owner" Type="System.Object" />
      </Parameters>
      <Docs>
        <remarks>To be added.</remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.Serialization.ExpressionContext" /> class with the given expression and owner. </para>
        </summary>
        <param name="expression">
          <attribution license="cc4" from="Microsoft" modified="false" />The given code expression.</param>
        <param name="expressionType">
          <attribution license="cc4" from="Microsoft" modified="false" />The given code expression type.</param>
        <param name="owner">
          <attribution license="cc4" from="Microsoft" modified="false" />The given code expression owner.</param>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public ExpressionContext (System.CodeDom.CodeExpression expression, Type expressionType, object owner, object presetValue);" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="expression" Type="System.CodeDom.CodeExpression" />
        <Parameter Name="expressionType" Type="System.Type" />
        <Parameter Name="owner" Type="System.Object" />
        <Parameter Name="presetValue" Type="System.Object" />
      </Parameters>
      <Docs>
        <remarks>To be added.</remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.Serialization.ExpressionContext" /> class with a current value.</para>
        </summary>
        <param name="expression">
          <attribution license="cc4" from="Microsoft" modified="false" />The given code expression.</param>
        <param name="expressionType">
          <attribution license="cc4" from="Microsoft" modified="false" />The given code expression type.</param>
        <param name="owner">
          <attribution license="cc4" from="Microsoft" modified="false" />The given code expression owner.</param>
        <param name="presetValue">
          <attribution license="cc4" from="Microsoft" modified="false" />The given code expression preset value.</param>
      </Docs>
    </Member>
    <Member MemberName="Expression">
      <MemberSignature Language="C#" Value="public System.CodeDom.CodeExpression Expression { get; }" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.CodeDom.CodeExpression</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the expression this context represents.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="ExpressionType">
      <MemberSignature Language="C#" Value="public Type ExpressionType { get; }" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Type</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>You can use <see cref="T:System.ComponentModel.Design.Serialization.ExpressionContext" /> to determine if a cast is needed when assigning to the expression.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the <see cref="T:System.Type" /> of the expression.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="Owner">
      <MemberSignature Language="C#" Value="public object Owner { get; }" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>If the expression is a property reference to the <see cref="P:System.Windows.Forms.Control.Text" /> property of an instance of <see cref="T:System.Windows.Forms.Button" /> called button1, <see cref="P:System.ComponentModel.Design.Serialization.ExpressionContext.Owner" /> returns button1.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the object owning this expression.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="PresetValue">
      <MemberSignature Language="C#" Value="public object PresetValue { get; }" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Contains the preset value of an expression, should one exist. For example, if the expression is a property reference expression referring to the <see cref="P:System.Windows.Forms.Control.Controls" /> property of a <see cref="T:System.Windows.Forms.Button" />, the <see cref="P:System.ComponentModel.Design.Serialization.ExpressionContext.PresetValue" /> property contains the instance of the <see cref="P:System.Windows.Forms.Control.Controls" /> property. This is because the property is read-only and preset by the object to contain a value. On the other hand, a property such as <see cref="P:System.Windows.Forms.Control.Text" /> or <see cref="P:System.Windows.Forms.Control.Visible" /> does not have a preset value and therefore the <see cref="P:System.ComponentModel.Design.Serialization.ExpressionContext.PresetValue" /> property returns null.</para>
          <para>The following C# code shows how serializers can use this information to guide serialization.</para>
          <para>[C#]</para>
          <code>Padding p = new Padding();
p.Left = 5;
button1.Padding = p;

button1.Padding.Left = 5;</code>
          <para>The serializer of the <see cref="T:System.Windows.Forms.Padding" /> structure needs to be informed if it should generate the first or second form. The first form is generated by default. The second form is only generated if there is an <see cref="T:System.ComponentModel.Design.Serialization.ExpressionContext" /> on the context stack that contains a <see cref="P:System.ComponentModel.Design.Serialization.ExpressionContext.PresetValue" /> equal to the value of the <see cref="T:System.Windows.Forms.Padding" /> currently being serialized.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the preset value of an expression.</para>
        </summary>
      </Docs>
    </Member>
  </Members>
</Type>