SoapEnvelopeProcessingElement.IsStrict Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether to throw an exception if the serializer encounters unexpected elements or attributes.
public:
property bool IsStrict { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("strict", DefaultValue=false)]
public bool IsStrict { get; set; }
[<System.Configuration.ConfigurationProperty("strict", DefaultValue=false)>]
member this.IsStrict : bool with get, set
Public Property IsStrict As Boolean
Property Value
true
if the Web services serializer tries to detect unexpected elements or attributes; otherwise, false
. The default is false
.
- Attributes
Remarks
Set the IsStrict property to true
in order to help debug interoperation scenarios. In general, when the XmlSerializer class meets an element or attribute that it does not expect it raises an UnknownNode event and continues processing. (The same is true when the Order, Order, or Order properties are used but data is sent out of order.) Setting the IsStrict property to true
instructs the Web services run time to handle that event and throw a InvalidOperationException that contains a list of the expected elements and attributes.
Note
Because exceptions are not thrown for all unexpected elements and attributes, the IsStrict property should not be relied upon except as a debugging aid. For example, unexpected xml:lang
and xml:space
attributes may not cause an exception.
Applies to
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: