WorkflowMarkupSerializer.SerializeToString(WorkflowMarkupSerializationManager, Object) 方法

定义

将指定的 Object 序列化为字符串。Serializes the specified Object to a string.

protected public:
 virtual System::String ^ SerializeToString(System::Workflow::ComponentModel::Serialization::WorkflowMarkupSerializationManager ^ serializationManager, System::Object ^ value);
protected internal virtual string SerializeToString (System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializationManager serializationManager, object value);
abstract member SerializeToString : System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializationManager * obj -> string
override this.SerializeToString : System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializationManager * obj -> string
Protected Friend Overridable Function SerializeToString (serializationManager As WorkflowMarkupSerializationManager, value As Object) As String

参数

serializationManager
WorkflowMarkupSerializationManager

管理序列化过程的 WorkflowMarkupSerializationManagerThe WorkflowMarkupSerializationManager that manages the serialization process.

value
Object

要序列化为字符串的 ObjectThe Object to serialize to a string.

返回

String

包含已序列化的 Object 的字符串。A string that contains the serialized Object.

例外

serializationManagervalue 包含空引用(在 Visual Basic 中为 Nothing)。serializationManager or value contains a null reference (Nothing in Visual Basic).

注解

如果可以从 Delegatevalue 实例赋值,则 SerializeToString 会将与 value 关联的方法名写入到字符串中。If a Delegate instance is assignable from value, SerializeToString writes the method name associated with value to a string. 如果可以从 Typevalue 实例赋值,则 SerializeToString 会将与 value 关联的类型的完全限定名写入到字符串中。If a Type instance is assignable from value, SerializeToString writes the fully-qualified name of the type associated with value to a string. 如果上述条件均不存在,则 SerializeToString 会将 value 转换为字符串并写入结果。If neither of these conditions exist, SerializeToString converts value to a string and writes the result.

适用于