Returns an expression for the given object.
Assembly: System.Design (in System.Design.dll)
protected CodeExpression GetExpression( IDesignerSerializationManager manager, Object value )
- Type: System.ComponentModel.Design.Serialization.IDesignerSerializationManager
The IDesignerSerializationManager to use for serialization.
- Type: System.Object
The object for which to get an expression.
The 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 SetExpression method.
The expression could have been found in the RootContext.
The expression could be derived through IReferenceService.
To derive expressions through IReferenceService, the method queries the reference service for a name for the given object. If the expression service returns a valid name, IReferenceService, the 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 ".", will split the reference into parts. The leftmost part is a name that will be evaluated with the GetInstance 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, will return null, indicating there is no existing expression for the object.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.