-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
ExpressionContext.xml
372 lines (356 loc) · 25 KB
/
ExpressionContext.xml
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<Type Name="ExpressionContext" FullName="System.ComponentModel.Design.Serialization.ExpressionContext">
<TypeSignature Language="C#" Value="public sealed class ExpressionContext" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ExpressionContext extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.ComponentModel.Design.Serialization.ExpressionContext" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class ExpressionContext" />
<TypeSignature Language="F#" Value="type ExpressionContext = class" />
<TypeSignature Language="C++ CLI" Value="public ref class ExpressionContext sealed" />
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms.Design</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="System.Design" FromVersion="4.0.0.0" To="System.Windows.Forms.Design" ToVersion="4.0.0.0" FrameworkAlternate="windowsdesktop-3.0;windowsdesktop-3.1" />
<TypeForwarding From="System.Design" FromVersion="5.0.0.0" To="System.Windows.Forms.Design" ToVersion="5.0.0.0" FrameworkAlternate="windowsdesktop-5.0" />
<TypeForwarding From="System.Design" FromVersion="6.0.0.0" To="System.Windows.Forms.Design" ToVersion="6.0.0.0" FrameworkAlternate="windowsdesktop-6.0" />
<TypeForwarding From="System.Design" FromVersion="7.0.0.0" To="System.Windows.Forms.Design" ToVersion="7.0.0.0" FrameworkAlternate="windowsdesktop-7.0" />
<TypeForwarding From="System.Design" FromVersion="8.0.0.0" To="System.Windows.Forms.Design" ToVersion="8.0.0.0" FrameworkAlternate="windowsdesktop-8.0" />
<TypeForwarding From="System.Design" FromVersion="9.0.0.0" To="System.Windows.Forms.Design" ToVersion="9.0.0.0" FrameworkAlternate="windowsdesktop-9.0" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(1)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides a means of passing context state among serializers. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
An <xref: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.
```csharp
button1.Text = "Hello";
```
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.
```csharp
button1.Text = rm.GetString("button1_Text");
```
In this case, the serializer responsible for creating the resource expression needs to be informed of the names of the target objects. The <xref: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.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.Design.Serialization.CodeDomSerializer" />
<altmember cref="T:System.CodeDom.CodeExpression" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.Serialization.ExpressionContext" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ExpressionContext (System.CodeDom.CodeExpression expression, Type expressionType, object owner);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.CodeDom.CodeExpression expression, class System.Type expressionType, object owner) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.Design.Serialization.ExpressionContext.#ctor(System.CodeDom.CodeExpression,System.Type,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (expression As CodeExpression, expressionType As Type, owner As Object)" />
<MemberSignature Language="F#" Value="new System.ComponentModel.Design.Serialization.ExpressionContext : System.CodeDom.CodeExpression * Type * obj -> System.ComponentModel.Design.Serialization.ExpressionContext" Usage="new System.ComponentModel.Design.Serialization.ExpressionContext (expression, expressionType, owner)" />
<MemberSignature Language="C++ CLI" Value="public:
 ExpressionContext(System::CodeDom::CodeExpression ^ expression, Type ^ expressionType, System::Object ^ owner);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms.Design</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="expression" Type="System.CodeDom.CodeExpression" />
<Parameter Name="expressionType" Type="System.Type" />
<Parameter Name="owner" Type="System.Object" />
</Parameters>
<Docs>
<param name="expression">The given code expression.</param>
<param name="expressionType">The given code expression type.</param>
<param name="owner">The given code expression owner.</param>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.Serialization.ExpressionContext" /> class with the given expression and owner.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="expression" />, <paramref name="expressionType" />, or <paramref name="owner" /> is <see langword="null" />.</exception>
<altmember cref="T:System.ComponentModel.Design.Serialization.CodeDomSerializer" />
<altmember cref="T:System.CodeDom.CodeExpression" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ExpressionContext (System.CodeDom.CodeExpression expression, Type expressionType, object owner, object presetValue);" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.CodeDom.CodeExpression expression, class System.Type expressionType, object owner, object presetValue) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.Design.Serialization.ExpressionContext.#ctor(System.CodeDom.CodeExpression,System.Type,System.Object,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (expression As CodeExpression, expressionType As Type, owner As Object, presetValue As Object)" />
<MemberSignature Language="F#" Value="new System.ComponentModel.Design.Serialization.ExpressionContext : System.CodeDom.CodeExpression * Type * obj * obj -> System.ComponentModel.Design.Serialization.ExpressionContext" Usage="new System.ComponentModel.Design.Serialization.ExpressionContext (expression, expressionType, owner, presetValue)" />
<MemberSignature Language="C++ CLI" Value="public:
 ExpressionContext(System::CodeDom::CodeExpression ^ expression, Type ^ expressionType, System::Object ^ owner, System::Object ^ presetValue);" />
<MemberSignature Language="C#" Value="public ExpressionContext (System.CodeDom.CodeExpression expression, Type expressionType, object owner, object? presetValue);" FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms.Design</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.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">
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="expression">The given code expression.</param>
<param name="expressionType">The given code expression type.</param>
<param name="owner">The given code expression owner.</param>
<param name="presetValue">The given code expression preset value.</param>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.Serialization.ExpressionContext" /> class with a current value.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="expression" />, <paramref name="expressionType" />, or <paramref name="owner" /> is <see langword="null" />.</exception>
<altmember cref="T:System.ComponentModel.Design.Serialization.CodeDomSerializer" />
<altmember cref="T:System.CodeDom.CodeExpression" />
</Docs>
</Member>
<Member MemberName="Expression">
<MemberSignature Language="C#" Value="public System.CodeDom.CodeExpression Expression { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.CodeDom.CodeExpression Expression" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.Serialization.ExpressionContext.Expression" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Expression As CodeExpression" />
<MemberSignature Language="F#" Value="member this.Expression : System.CodeDom.CodeExpression" Usage="System.ComponentModel.Design.Serialization.ExpressionContext.Expression" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::CodeDom::CodeExpression ^ Expression { System::CodeDom::CodeExpression ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms.Design</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.CodeDom.CodeExpression</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the expression this context represents.</summary>
<value>The expression this context represents.</value>
<remarks>To be added.</remarks>
<altmember cref="T:System.ComponentModel.Design.Serialization.CodeDomSerializer" />
<altmember cref="T:System.CodeDom.CodeExpression" />
</Docs>
</Member>
<Member MemberName="ExpressionType">
<MemberSignature Language="C#" Value="public Type ExpressionType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type ExpressionType" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.Serialization.ExpressionContext.ExpressionType" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ExpressionType As Type" />
<MemberSignature Language="F#" Value="member this.ExpressionType : Type" Usage="System.ComponentModel.Design.Serialization.ExpressionContext.ExpressionType" />
<MemberSignature Language="C++ CLI" Value="public:
 property Type ^ ExpressionType { Type ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms.Design</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.Type" /> of the expression.</summary>
<value>The <see cref="T:System.Type" /> of the expression.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use <xref:System.ComponentModel.Design.Serialization.ExpressionContext> to determine if a cast is needed when assigning to the expression.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.Design.Serialization.CodeDomSerializer" />
<altmember cref="T:System.CodeDom.CodeExpression" />
</Docs>
</Member>
<Member MemberName="Owner">
<MemberSignature Language="C#" Value="public object Owner { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Owner" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.Serialization.ExpressionContext.Owner" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Owner As Object" />
<MemberSignature Language="F#" Value="member this.Owner : obj" Usage="System.ComponentModel.Design.Serialization.ExpressionContext.Owner" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Object ^ Owner { System::Object ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms.Design</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the object owning this expression.</summary>
<value>The object owning this expression.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the expression is a property reference to the <xref:System.Windows.Forms.Control.Text%2A> property of an instance of <xref:System.Windows.Forms.Button> called `button1`, <xref:System.ComponentModel.Design.Serialization.ExpressionContext.Owner%2A> returns `button1`.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.Design.Serialization.CodeDomSerializer" />
<altmember cref="T:System.CodeDom.CodeExpression" />
</Docs>
</Member>
<Member MemberName="PresetValue">
<MemberSignature Language="C#" Value="public object PresetValue { get; }" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0" />
<MemberSignature Language="ILAsm" Value=".property instance object PresetValue" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.Design.Serialization.ExpressionContext.PresetValue" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property PresetValue As Object" />
<MemberSignature Language="F#" Value="member this.PresetValue : obj" Usage="System.ComponentModel.Design.Serialization.ExpressionContext.PresetValue" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Object ^ PresetValue { System::Object ^ get(); };" />
<MemberSignature Language="C#" Value="public object? PresetValue { get; }" FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms.Design</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[get: System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the preset value of an expression.</summary>
<value>The preset value of this expression, or <see langword="null" /> if not assigned.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Contains the preset value of an expression, should one exist. For example, if the expression is a property reference expression referring to the <xref:System.Windows.Forms.Control.Controls%2A> property of a <xref:System.Windows.Forms.Button>, the <xref:System.ComponentModel.Design.Serialization.ExpressionContext.PresetValue%2A> property contains the instance of the <xref:System.Windows.Forms.Control.Controls%2A> 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 <xref:System.Windows.Forms.Control.Text%2A> or <xref:System.Windows.Forms.Control.Visible%2A> does not have a preset value and therefore the <xref:System.ComponentModel.Design.Serialization.ExpressionContext.PresetValue%2A> property returns `null`.
The following C# code shows how serializers can use this information to guide serialization.
```csharp
Padding p = new Padding();
p.Left = 5;
button1.Padding = p;
button1.Padding.Left = 5;
```
The serializer of the <xref: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 <xref:System.ComponentModel.Design.Serialization.ExpressionContext> on the context stack that contains a <xref:System.ComponentModel.Design.Serialization.ExpressionContext.PresetValue%2A> equal to the value of the <xref:System.Windows.Forms.Padding> currently being serialized.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.Design.Serialization.CodeDomSerializer" />
<altmember cref="T:System.CodeDom.CodeExpression" />
</Docs>
</Member>
</Members>
</Type>