SqlPersistenceProviderFactory.SerializeAsText 属性

定义

指定使用此工厂创建的永久性提供程序中数据是否序列化为文本而不是二进制数据。

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;否则为 false

示例

下面的代码示例演示如何访问 SerializeAsText 属性。

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

注解

The default value for serializeAsText is false, which indicates that persistence information is serialized as binary data.

适用于