Редактиране

Споделяне чрез


DataSet.SchemaSerializationMode Property

Definition

Gets or sets a SchemaSerializationMode for a DataSet.

public:
 virtual property System::Data::SchemaSerializationMode SchemaSerializationMode { System::Data::SchemaSerializationMode get(); void set(System::Data::SchemaSerializationMode value); };
[System.ComponentModel.Browsable(false)]
public virtual System.Data.SchemaSerializationMode SchemaSerializationMode { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.SchemaSerializationMode : System.Data.SchemaSerializationMode with get, set
Public Overridable Property SchemaSerializationMode As SchemaSerializationMode

Property Value

A SchemaSerializationMode for a DataSet.

Attributes

Remarks

A DataSet serializes its schema and instance data by default in Web services and remoting scenarios. Setting the SchemaSerializationMode property of a typed DataSet to ExcludeSchema causes schema information to be excluded from the serialization payload.

ExcludeSchema is supported only for a typed DataSet. For an un-typed DataSet this property can only be set to IncludeSchema.

ExcludeSchema should only be used in cases where the schema information of the underlying typed DataTables, DataRelations and Constraints has not been modified. If modifications have occurred, complete schema information should be serialized with IncludeSchema.

ExcludeSchema is supported in version 2.0 of the .NET Framework or later.

When ExcludeSchema is set, only the top level runtime properties present on the DataSet are serialized. In addition, they are serialized only if they happen to be different from the default values. None of the Tables, Relations or Constraints are serialized. The serialized runtime properties include DataSetName, Namespace, Prefix, Locale, EnforceConstraints, and CaseSensitive. These properties are serialized to make sure that overall runtime data integrity is preserved.

Applies to

See also