- instance
- Documentation for this section has not yet been entered.
- manager
- The System.ComponentModel.Design.Serialization.IDesignerSerializationManager to use for serialization.
A System.CodeDom.CodeExpression representing value, or null if there is no existing expression for value.
The CodeDomSerializerBase.GetExpression(IDesignerSerializationManager, object) method returns an expression representing the given object. It can return null, indicating that no expression has been set that describes the object. Expressions are acquired in one of three ways:
The expression could be the result of a prior call to the erload:System.ComponentModel.Design.Serialization.CodeDomSerializerBase.SetExpression method.
The expression could have been found in the System.ComponentModel.Design.Serialization.RootContext.
The expression could be derived through System.ComponentModel.Design.IReferenceService.
To derive expressions through System.ComponentModel.Design.IReferenceService, the CodeDomSerializerBase.GetExpression(IDesignerSerializationManager, object) method queries the reference service for a name for the given object. If the expression service returns a valid name, System.ComponentModel.Design.IReferenceService, the CodeDomSerializerBase.GetExpression(IDesignerSerializationManager, object) method checks to see if there is a "." in the name. This indicates that the expression service found this object as the return value of a read-only property on another object. If there is a ".", CodeDomSerializerBase.GetExpression(IDesignerSerializationManager, object) will split the reference into parts. The leftmost part is a name that will be evaluated with the IDesignerSerializationManager.GetInstance(string) method. For each subsequent part, a property reference expression will be built. The final expression will then be returned.
If the object did not have an expression set, or if the object was not found in the reference service, CodeDomSerializerBase.GetExpression(IDesignerSerializationManager, object) will return null, indicating there is no existing expression for the object.