CodePorting.Translator.Cs2Cpp.Framework
System::Xml::XmlReaderSettings Class Referencefinal

Specifies a set of features to support on the XmlReader object created by the XmlReader::Create method. More...

#include <xml_reader_settings.h>

Inherits System::Object.

Public Types

using Ptr = SharedPtr< XmlReaderSettings >
 An alias for shared pointer to an instance of this class. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 

Public Member Functions

SharedPtr< XmlNameTableget_NameTable ()
 Returns the XmlNameTable used for atomized string comparisons. More...
 
void set_NameTable (const SharedPtr< XmlNameTable > &value)
 Sets the XmlNameTable used for atomized string comparisons. More...
 
void set_XmlResolver (const SharedPtr< System::Xml::XmlResolver > &value)
 Sets the XmlResolver used to access external documents. More...
 
int32_t get_LineNumberOffset ()
 Returns line number offset of the XmlReader object. More...
 
void set_LineNumberOffset (int32_t value)
 Sets line number offset of the XmlReader object. More...
 
int32_t get_LinePositionOffset ()
 Returns line position offset of the XmlReader object. More...
 
void set_LinePositionOffset (int32_t value)
 Sets line position offset of the XmlReader object. More...
 
System::Xml::ConformanceLevel get_ConformanceLevel ()
 Returns the level of conformance which the XmlReader will comply. More...
 
void set_ConformanceLevel (System::Xml::ConformanceLevel value)
 Sets the level of conformance which the XmlReader will comply. More...
 
bool get_CheckCharacters ()
 Returns a value indicating whether to do character checking. More...
 
void set_CheckCharacters (bool value)
 Sets a value indicating whether to do character checking. More...
 
int64_t get_MaxCharactersInDocument ()
 Returns a value indicating the maximum allowable number of characters in an XML document. A zero (0) value means no limits on the size of the XML document. A non-zero value specifies the maximum size, in characters. More...
 
void set_MaxCharactersInDocument (int64_t value)
 Sets a value indicating the maximum allowable number of characters in an XML document. A zero (0) value means no limits on the size of the XML document. A non-zero value specifies the maximum size, in characters. More...
 
int64_t get_MaxCharactersFromEntities ()
 Returns a value indicating the maximum allowable number of characters in a document that result from expanding entities. More...
 
void set_MaxCharactersFromEntities (int64_t value)
 Sets a value indicating the maximum allowable number of characters in a document that result from expanding entities. More...
 
bool get_IgnoreWhitespace ()
 Returns a value indicating whether to ignore insignificant white space. More...
 
void set_IgnoreWhitespace (bool value)
 Sets a value indicating whether to ignore insignificant white space. More...
 
bool get_IgnoreProcessingInstructions ()
 Returns a value indicating whether to ignore processing instructions. More...
 
void set_IgnoreProcessingInstructions (bool value)
 Sets a value indicating whether to ignore processing instructions. More...
 
bool get_IgnoreComments ()
 Returns a value indicating whether to ignore comments. More...
 
void set_IgnoreComments (bool value)
 Sets a value indicating whether to ignore comments. More...
 
bool get_ProhibitDtd ()
 Returns a value indicating whether to prohibit document type definition (DTD) processing. More...
 
void set_ProhibitDtd (bool value)
 Sets a value indicating whether to prohibit document type definition (DTD) processing. More...
 
System::Xml::DtdProcessing get_DtdProcessing ()
 Returns a value that determines the processing of DTDs. More...
 
void set_DtdProcessing (System::Xml::DtdProcessing value)
 Sets a value that determines the processing of DTDs. More...
 
bool get_CloseInput ()
 Returns a value indicating whether the underlying stream or TextReader should be closed when the reader is closed. More...
 
void set_CloseInput (bool value)
 Sets a value indicating whether the underlying stream or TextReader should be closed when the reader is closed. More...
 
System::Xml::ValidationType get_ValidationType ()
 Returns a value indicating whether the XmlReader will perform validation or type assignment when reading. More...
 
void set_ValidationType (System::Xml::ValidationType value)
 Sets a value indicating whether the XmlReader will perform validation or type assignment when reading. More...
 
Schema::XmlSchemaValidationFlags get_ValidationFlags ()
 Returns a value indicating the schema validation settings. This setting applies to XmlReader objects that validate schemas (XmlReaderSettings::get_ValidationType value is ValidationType::Schema). More...
 
void set_ValidationFlags (Schema::XmlSchemaValidationFlags value)
 Sets a value indicating the schema validation settings. This setting applies to XmlReader objects that validate schemas (XmlReaderSettings::get_ValidationType value is ValidationType::Schema). More...
 
SharedPtr< Schema::XmlSchemaSetget_Schemas ()
 Returns the XmlSchemaSet to use when performing schema validation. More...
 
void set_Schemas (const SharedPtr< Schema::XmlSchemaSet > &value)
 Sets the XmlSchemaSet to use when performing schema validation. More...
 
 XmlReaderSettings ()
 Initializes a new instance of the XmlReaderSettings class. More...
 
template<class... Args>
void ValidationEventHandler_add (Args... value)
 Adds an event handler that occurs when the reader encounters validation errors. More...
 
template<class... Args>
void ValidationEventHandler_remove (Args... value)
 Removes an event handler that occurs when the reader encounters validation errors. More...
 
void Reset ()
 Resets the members of the settings class to their default values. More...
 
SharedPtr< XmlReaderSettingsClone ()
 Creates a copy of the XmlReaderSettings instance. More...
 
void CheckReadOnly (const String &propertyName)
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

virtual ~XmlReaderSettings ()
 

Additional Inherited Members

- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 

Detailed Description

Specifies a set of features to support on the XmlReader object created by the XmlReader::Create method.

Attention
Objects of this class should only be allocated using System::MakeObject() function. Never create instances of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

Member Typedef Documentation

◆ Ptr

An alias for shared pointer to an instance of this class.

Constructor & Destructor Documentation

◆ XmlReaderSettings()

System::Xml::XmlReaderSettings::XmlReaderSettings ( )

Initializes a new instance of the XmlReaderSettings class.

◆ ~XmlReaderSettings()

virtual System::Xml::XmlReaderSettings::~XmlReaderSettings ( )
protectedvirtual

Member Function Documentation

◆ CheckReadOnly()

void System::Xml::XmlReaderSettings::CheckReadOnly ( const String propertyName)

◆ Clone()

SharedPtr< XmlReaderSettings > System::Xml::XmlReaderSettings::Clone ( )

Creates a copy of the XmlReaderSettings instance.

Returns
The cloned XmlReaderSettings object.

◆ get_CheckCharacters()

bool System::Xml::XmlReaderSettings::get_CheckCharacters ( )

Returns a value indicating whether to do character checking.

Returns
true to do character checking; otherwise false. The default is true.

◆ get_CloseInput()

bool System::Xml::XmlReaderSettings::get_CloseInput ( )

Returns a value indicating whether the underlying stream or TextReader should be closed when the reader is closed.

Returns
true to close the underlying stream or TextReader when the reader is closed; otherwise false. The default is false.

◆ get_ConformanceLevel()

System::Xml::ConformanceLevel System::Xml::XmlReaderSettings::get_ConformanceLevel ( )

Returns the level of conformance which the XmlReader will comply.

Returns
One of the enumeration values that specifies the level of conformance that the XML reader will enforce. The default is ConformanceLevel::Document.

◆ get_DtdProcessing()

System::Xml::DtdProcessing System::Xml::XmlReaderSettings::get_DtdProcessing ( )

Returns a value that determines the processing of DTDs.

Returns
One of the enumeration values that determines the processing of DTDs. The default is DtdProcessing::Prohibit.

◆ get_IgnoreComments()

bool System::Xml::XmlReaderSettings::get_IgnoreComments ( )

Returns a value indicating whether to ignore comments.

Returns
true to ignore comments; otherwise false. The default is false.

◆ get_IgnoreProcessingInstructions()

bool System::Xml::XmlReaderSettings::get_IgnoreProcessingInstructions ( )

Returns a value indicating whether to ignore processing instructions.

Returns
true to ignore processing instructions; otherwise false. The default is false.

◆ get_IgnoreWhitespace()

bool System::Xml::XmlReaderSettings::get_IgnoreWhitespace ( )

Returns a value indicating whether to ignore insignificant white space.

Returns
true to ignore white space; otherwise false. The default is false.

◆ get_LineNumberOffset()

int32_t System::Xml::XmlReaderSettings::get_LineNumberOffset ( )

Returns line number offset of the XmlReader object.

Returns
The line number offset. The default is 0.

◆ get_LinePositionOffset()

int32_t System::Xml::XmlReaderSettings::get_LinePositionOffset ( )

Returns line position offset of the XmlReader object.

Returns
The line position offset. The default is 0.

◆ get_MaxCharactersFromEntities()

int64_t System::Xml::XmlReaderSettings::get_MaxCharactersFromEntities ( )

Returns a value indicating the maximum allowable number of characters in a document that result from expanding entities.

Returns
The maximum allowable number of characters from expanded entities. The default is 0.

◆ get_MaxCharactersInDocument()

int64_t System::Xml::XmlReaderSettings::get_MaxCharactersInDocument ( )

Returns a value indicating the maximum allowable number of characters in an XML document. A zero (0) value means no limits on the size of the XML document. A non-zero value specifies the maximum size, in characters.

Returns
The maximum allowable number of characters in an XML document. The default is 0.

◆ get_NameTable()

SharedPtr< XmlNameTable > System::Xml::XmlReaderSettings::get_NameTable ( )

Returns the XmlNameTable used for atomized string comparisons.

Returns
The XmlNameTable that stores all the atomized strings used by all XmlReader instances created using this XmlReaderSettings object. The default is nullptr. The created XmlReader instance will use a new empty NameTable if this value is nullptr.

◆ get_ProhibitDtd()

bool System::Xml::XmlReaderSettings::get_ProhibitDtd ( )

Returns a value indicating whether to prohibit document type definition (DTD) processing.

Deprecated:
This method is obsolete. Use XmlTextReader::get_DtdProcessing instead.
Returns
true to prohibit DTD processing; otherwise false. The default is true.

◆ get_Schemas()

SharedPtr< Schema::XmlSchemaSet > System::Xml::XmlReaderSettings::get_Schemas ( )

Returns the XmlSchemaSet to use when performing schema validation.

Returns
The XmlSchemaSet to use when performing schema validation. The default is an empty XmlSchemaSet object.

◆ get_ValidationFlags()

Schema::XmlSchemaValidationFlags System::Xml::XmlReaderSettings::get_ValidationFlags ( )

Returns a value indicating the schema validation settings. This setting applies to XmlReader objects that validate schemas (XmlReaderSettings::get_ValidationType value is ValidationType::Schema).

Returns
A bitwise combination of enumeration values that specify validation options. XmlSchemaValidationFlags::ProcessIdentityConstraints and XmlSchemaValidationFlags::AllowXmlAttributes are enabled by default. XmlSchemaValidationFlags::ProcessInlineSchema, XmlSchemaValidationFlags::ProcessSchemaLocation and XmlSchemaValidationFlags::ReportValidationWarnings are disabled by default.

◆ get_ValidationType()

System::Xml::ValidationType System::Xml::XmlReaderSettings::get_ValidationType ( )

Returns a value indicating whether the XmlReader will perform validation or type assignment when reading.

Returns
One of the ValidationType values that indicates whether XmlReader will perform validation or type assignment when reading. The default is ValidationType::None.

◆ Reset()

void System::Xml::XmlReaderSettings::Reset ( )

Resets the members of the settings class to their default values.

◆ set_CheckCharacters()

void System::Xml::XmlReaderSettings::set_CheckCharacters ( bool  value)

Sets a value indicating whether to do character checking.

Parameters
valueThe value to set.

◆ set_CloseInput()

void System::Xml::XmlReaderSettings::set_CloseInput ( bool  value)

Sets a value indicating whether the underlying stream or TextReader should be closed when the reader is closed.

Parameters
valueThe value to set.

◆ set_ConformanceLevel()

void System::Xml::XmlReaderSettings::set_ConformanceLevel ( System::Xml::ConformanceLevel  value)

Sets the level of conformance which the XmlReader will comply.

Parameters
valueThe value to set.

◆ set_DtdProcessing()

void System::Xml::XmlReaderSettings::set_DtdProcessing ( System::Xml::DtdProcessing  value)

Sets a value that determines the processing of DTDs.

Parameters
valueThe value to set.

◆ set_IgnoreComments()

void System::Xml::XmlReaderSettings::set_IgnoreComments ( bool  value)

Sets a value indicating whether to ignore comments.

Parameters
valueThe value to set.

◆ set_IgnoreProcessingInstructions()

void System::Xml::XmlReaderSettings::set_IgnoreProcessingInstructions ( bool  value)

Sets a value indicating whether to ignore processing instructions.

Parameters
valueThe value to set.

◆ set_IgnoreWhitespace()

void System::Xml::XmlReaderSettings::set_IgnoreWhitespace ( bool  value)

Sets a value indicating whether to ignore insignificant white space.

Parameters
valueThe value to set.

◆ set_LineNumberOffset()

void System::Xml::XmlReaderSettings::set_LineNumberOffset ( int32_t  value)

Sets line number offset of the XmlReader object.

Parameters
valueThe value to set.

◆ set_LinePositionOffset()

void System::Xml::XmlReaderSettings::set_LinePositionOffset ( int32_t  value)

Sets line position offset of the XmlReader object.

Parameters
valueThe value to set.

◆ set_MaxCharactersFromEntities()

void System::Xml::XmlReaderSettings::set_MaxCharactersFromEntities ( int64_t  value)

Sets a value indicating the maximum allowable number of characters in a document that result from expanding entities.

Parameters
valueThe value to set.

◆ set_MaxCharactersInDocument()

void System::Xml::XmlReaderSettings::set_MaxCharactersInDocument ( int64_t  value)

Sets a value indicating the maximum allowable number of characters in an XML document. A zero (0) value means no limits on the size of the XML document. A non-zero value specifies the maximum size, in characters.

Parameters
valueThe value to set.

◆ set_NameTable()

void System::Xml::XmlReaderSettings::set_NameTable ( const SharedPtr< XmlNameTable > &  value)

Sets the XmlNameTable used for atomized string comparisons.

Parameters
valueThe value to set.

◆ set_ProhibitDtd()

void System::Xml::XmlReaderSettings::set_ProhibitDtd ( bool  value)

Sets a value indicating whether to prohibit document type definition (DTD) processing.

Deprecated:
This method is obsolete. Use XmlTextReader::set_DtdProcessing instead.
Parameters
valueThe value to set.

◆ set_Schemas()

void System::Xml::XmlReaderSettings::set_Schemas ( const SharedPtr< Schema::XmlSchemaSet > &  value)

Sets the XmlSchemaSet to use when performing schema validation.

Parameters
valueThe value to set.

◆ set_ValidationFlags()

void System::Xml::XmlReaderSettings::set_ValidationFlags ( Schema::XmlSchemaValidationFlags  value)

Sets a value indicating the schema validation settings. This setting applies to XmlReader objects that validate schemas (XmlReaderSettings::get_ValidationType value is ValidationType::Schema).

Parameters
valueThe value to set.

◆ set_ValidationType()

void System::Xml::XmlReaderSettings::set_ValidationType ( System::Xml::ValidationType  value)

Sets a value indicating whether the XmlReader will perform validation or type assignment when reading.

Parameters
valueThe value to set.

◆ set_XmlResolver()

void System::Xml::XmlReaderSettings::set_XmlResolver ( const SharedPtr< System::Xml::XmlResolver > &  value)

Sets the XmlResolver used to access external documents.

Parameters
valueThe value to set.

◆ ValidationEventHandler_add()

template<class... Args>
void System::Xml::XmlReaderSettings::ValidationEventHandler_add ( Args...  value)
inline

Adds an event handler that occurs when the reader encounters validation errors.

Parameters
valueA bound or static method or ValidationEventHandler instance.

◆ ValidationEventHandler_remove()

template<class... Args>
void System::Xml::XmlReaderSettings::ValidationEventHandler_remove ( Args...  value)
inline

Removes an event handler that occurs when the reader encounters validation errors.

Parameters
valueA bound or static method or ValidationEventHandler instance.