CodeDomSerializer.SerializeToReferenceExpression 方法

定义

注意

This method has been deprecated. Use SerializeToExpression or GetExpression instead. http://go.microsoft.com/fwlink/?linkid=14202

注意

This method has been deprecated. Use SerializeToExpression or GetExpression instead. https://go.microsoft.com/fwlink/?linkid=14202

将指定值序列化为 CodeDOM 表达式。

protected:
 System::CodeDom::CodeExpression ^ SerializeToReferenceExpression(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, System::Object ^ value);
protected System.CodeDom.CodeExpression SerializeToReferenceExpression (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);
[System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.  http://go.microsoft.com/fwlink/?linkid=14202")]
protected System.CodeDom.CodeExpression SerializeToReferenceExpression (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);
[System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.  https://go.microsoft.com/fwlink/?linkid=14202")]
protected System.CodeDom.CodeExpression SerializeToReferenceExpression (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);
[System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.  https://go.microsoft.com/fwlink/?linkid=14202")]
protected System.CodeDom.CodeExpression? SerializeToReferenceExpression (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);
member this.SerializeToReferenceExpression : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * obj -> System.CodeDom.CodeExpression
[<System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.  http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.SerializeToReferenceExpression : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * obj -> System.CodeDom.CodeExpression
[<System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.  https://go.microsoft.com/fwlink/?linkid=14202")>]
member this.SerializeToReferenceExpression : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * obj -> System.CodeDom.CodeExpression
Protected Function SerializeToReferenceExpression (manager As IDesignerSerializationManager, value As Object) As CodeExpression

参数

manager
IDesignerSerializationManager

要在序列化过程中使用的序列化管理器。

value
Object

要序列化的对象。

返回

已序列化的值。 如果无法获得指定值的引用表达式,或者无法序列化该值,则该方法返回 null

属性

注解

此方法类似于 SerializeToExpression,不同之处在于,如果无法获取值的简单引用表达式,此方法将停止。 如果希望生成的表达式用作语句的参数或目标,请调用此方法。

适用于