System.Design 2.0.0.0 System.Object

An is placed on the context stack and contains the most relevant expression during serialization. The following C# code demonstrates an assignment.

`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.

`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 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.

Provides a means of passing context state among serializers. This class cannot be inherited.

- Constructor
  2.0.0.0
  To be added.

  Initializes a new instance of the class with the given expression and owner.

  The given code expression.
  The given code expression type.
  The given code expression owner.
- Constructor
  2.0.0.0
  To be added.

  Initializes a new instance of the class with a current value.

  The given code expression.
  The given code expression type.
  The given code expression owner.
  The given code expression preset value.
- Property
  2.0.0.0
  System.CodeDom.CodeExpression To be added. To be added.

  Gets the expression this context represents.

- Property
  2.0.0.0
  System.Type To be added.

  You can use to determine if a cast is needed when assigning to the expression.

  Gets the of the expression.

- Property
  2.0.0.0
  System.Object To be added.

  If the expression is a property reference to the property of an instance of called button1, returns button1.

  Gets the object owning this expression.

- Property
  2.0.0.0
  System.Object To be added.

  Contains the preset value of an expression, should one exist. For example, if the expression is a property reference expression referring to the property of a , the property contains the instance of the 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 or does not have a preset value and therefore the property returns null.

  The following C# code shows how serializers can use this information to guide serialization.

  [C#]

  `Padding p = new Padding(); p.Left = 5; button1.Padding = p; button1.Padding.Left = 5;`

  The serializer of the 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 on the context stack that contains a equal to the value of the currently being serialized.

  Gets the preset value of an expression.