SqlPersistenceProviderFactory.SerializeAsText 属性

定义

指定使用此工厂创建的永久性提供程序中数据是否序列化为文本而不是二进制数据。Specifies whether data is serialized as text rather than binary in persistence providers created with this factory.

public:
 property bool SerializeAsText { bool get(); void set(bool value); };
public bool SerializeAsText { get; set; }
member this.SerializeAsText : bool with get, set
Public Property SerializeAsText As Boolean

属性值

Boolean

如果将服务信息序列化为文本,则为 true;否则为 falsetrue if the service information is serialized as text; otherwise, false.

示例

下面的代码示例演示如何访问 SerializeAsText 属性。The following code example shows how to access the SerializeAsText property.

SqlPersistenceProviderFactory factory = new SqlPersistenceProviderFactory(
     DataBaseConstants.ConnectionString);
bool serializeAsText = factory.SerializeAsText;

注解

的默认值 serializeAsTextfalse ,该值指示持久性信息序列化为二进制数据。The default value for serializeAsText is false, which indicates that persistence information is serialized as binary data.

适用于