System::Security::SecurityElement Class Referencefinal

XML object model for encoding security object. Not implemented. Objects of this class should only be allocated using System::MakeObject() function. Never create instance 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. More...

Inherits System::Object.

Public Member Functions

ASPOSECPP_SHARED_API SecurityElement (const String &tag)
 Constructor. More...
 
ASPOSECPP_SHARED_API SecurityElement (const String &tag, const String &text)
 Constructor. More...
 
ASPOSECPP_SHARED_API System::Collections::Generic::Dictionary< String, Stringget_Attributes ()
 Gets tag attributes. More...
 
ASPOSECPP_SHARED_API void set_Attributes (System::Collections::Generic::Dictionary< String, String > value)
 Sets tag attributes. More...
 
ASPOSECPP_SHARED_API System::Collections::Generic::List< SecurityElementget_Children ()
 Gets tag child objects. More...
 
ASPOSECPP_SHARED_API void set_Children (System::Collections::Generic::List< SecurityElement > value)
 Sets tag child objects. More...
 
ASPOSECPP_SHARED_API String get_Tag ()
 Gets tag name. More...
 
ASPOSECPP_SHARED_API void set_Tag (const String &value)
 Sets tag name. More...
 
ASPOSECPP_SHARED_API String get_Text ()
 Gets tag inner text. More...
 
ASPOSECPP_SHARED_API void set_Text (const String &value)
 Sets tag inner text. More...
 
ASPOSECPP_SHARED_API void AddAttribute (const String &name, const String &value)
 Adds attribute to tag. More...
 
ASPOSECPP_SHARED_API void AddChild (SecurityElement child)
 Adds child tag. More...
 
ASPOSECPP_SHARED_API String Attribute (const String &name)
 Gets attribute value. More...
 
ASPOSECPP_SHARED_API SecurityElement Copy ()
 Clones tag. More...
 
ASPOSECPP_SHARED_API bool Equal (SecurityElement other)
 Checks for parameters equality. More...
 
ASPOSECPP_SHARED_API SecurityElement SearchForChildByTag (const String &tag)
 Gets child tag by name. More...
 
ASPOSECPP_SHARED_API String SearchForTextOfTag (const String &tag)
 Gets child tag inner text by tag name. More...
 
ASPOSECPP_SHARED_API String ToString () const override
 Converts tag to string. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API 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...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API 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 ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. 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...
 
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...
 

Static Public Member Functions

static String Escape (const String &str)
 Escapes characters in XML string. More...
 
static ASPOSECPP_SHARED_API SecurityElement FromString (const String &xml)
 Creates element from XML code. More...
 
static ASPOSECPP_SHARED_API bool IsValidAttributeName (const String &name)
 Checks if attribute name is valid. More...
 
static ASPOSECPP_SHARED_API bool IsValidAttributeValue (const String &value)
 Checks if attribute value is valid. More...
 
static ASPOSECPP_SHARED_API bool IsValidTag (const String &tag)
 Checks if tag is valid. More...
 
static ASPOSECPP_SHARED_API bool IsValidText (const String &text)
 Checks if text is valid. More...
 
- 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...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 

Detailed Description

XML object model for encoding security object. Not implemented. Objects of this class should only be allocated using System::MakeObject() function. Never create instance 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.

Constructor & Destructor Documentation

◆ SecurityElement() [1/2]

ASPOSECPP_SHARED_API System::Security::SecurityElement::SecurityElement ( const String tag)

Constructor.

Parameters
tagXML tag name.

◆ SecurityElement() [2/2]

ASPOSECPP_SHARED_API System::Security::SecurityElement::SecurityElement ( const String tag,
const String text 
)

Constructor.

Parameters
tagXML tag name.
textXML text inside given tag.

Member Function Documentation

◆ AddAttribute()

ASPOSECPP_SHARED_API void System::Security::SecurityElement::AddAttribute ( const String name,
const String value 
)

Adds attribute to tag.

Parameters
nameAttribute name.
valueAttribute value.

◆ AddChild()

ASPOSECPP_SHARED_API void System::Security::SecurityElement::AddChild ( SecurityElement  child)

Adds child tag.

Parameters
childTag to add as a child.

◆ Attribute()

ASPOSECPP_SHARED_API String System::Security::SecurityElement::Attribute ( const String name)

Gets attribute value.

Returns
Attribute value or null if not found.

◆ Copy()

ASPOSECPP_SHARED_API SecurityElement System::Security::SecurityElement::Copy ( )

Clones tag.

Returns
Tag copy.

◆ Equal()

ASPOSECPP_SHARED_API bool System::Security::SecurityElement::Equal ( SecurityElement  other)

Checks for parameters equality.

Parameters
otherTag to compare to.
Returns
True if tags match, false otherwise.

◆ Escape()

static String System::Security::SecurityElement::Escape ( const String str)
inlinestatic

Escapes characters in XML string.

Parameters
strString to escape.
Returns
Escaped string.

◆ FromString()

static ASPOSECPP_SHARED_API SecurityElement System::Security::SecurityElement::FromString ( const String xml)
static

Creates element from XML code.

Parameters
xmlXML code.
Returns
Newly created element.

◆ get_Attributes()

ASPOSECPP_SHARED_API System::Collections::Generic::Dictionary<String, String> System::Security::SecurityElement::get_Attributes ( )

Gets tag attributes.

Returns
Attributes keys and values collection.

◆ get_Children()

ASPOSECPP_SHARED_API System::Collections::Generic::List<SecurityElement> System::Security::SecurityElement::get_Children ( )

Gets tag child objects.

Returns
List of child elements.

◆ get_Tag()

ASPOSECPP_SHARED_API String System::Security::SecurityElement::get_Tag ( )

Gets tag name.

Returns
Tag name.

◆ get_Text()

ASPOSECPP_SHARED_API String System::Security::SecurityElement::get_Text ( )

Gets tag inner text.

Returns
Tag inner text.

◆ IsValidAttributeName()

static ASPOSECPP_SHARED_API bool System::Security::SecurityElement::IsValidAttributeName ( const String name)
static

Checks if attribute name is valid.

Parameters
nameName to check.
Returns
True if name is valid, false otherwise.

◆ IsValidAttributeValue()

static ASPOSECPP_SHARED_API bool System::Security::SecurityElement::IsValidAttributeValue ( const String value)
static

Checks if attribute value is valid.

Parameters
valueValue to check.
Returns
True if value is valid, false otherwise.

◆ IsValidTag()

static ASPOSECPP_SHARED_API bool System::Security::SecurityElement::IsValidTag ( const String tag)
static

Checks if tag is valid.

Parameters
tagTag to test.
Returns
True if tag is valid, false otherwise.

◆ IsValidText()

static ASPOSECPP_SHARED_API bool System::Security::SecurityElement::IsValidText ( const String text)
static

Checks if text is valid.

Parameters
textText to test.
Returns
True if text is valid, false otherwise.

◆ SearchForChildByTag()

ASPOSECPP_SHARED_API SecurityElement System::Security::SecurityElement::SearchForChildByTag ( const String tag)

Gets child tag by name.

Parameters
tagTag name to look for.
Returns
Child element or null if not found.

◆ SearchForTextOfTag()

ASPOSECPP_SHARED_API String System::Security::SecurityElement::SearchForTextOfTag ( const String tag)

Gets child tag inner text by tag name.

Parameters
tagTag name to look for.
Returns
Text of the first tag with specified name or null if not found.

◆ set_Attributes()

ASPOSECPP_SHARED_API void System::Security::SecurityElement::set_Attributes ( System::Collections::Generic::Dictionary< String, String value)

Sets tag attributes.

Parameters
valueAttributes keys and values collection.

◆ set_Children()

ASPOSECPP_SHARED_API void System::Security::SecurityElement::set_Children ( System::Collections::Generic::List< SecurityElement value)

Sets tag child objects.

Parameters
valueList of child elements.

◆ set_Tag()

ASPOSECPP_SHARED_API void System::Security::SecurityElement::set_Tag ( const String value)

Sets tag name.

Parameters
valueTag name.

◆ set_Text()

ASPOSECPP_SHARED_API void System::Security::SecurityElement::set_Text ( const String value)

Sets tag inner text.

Parameters
valueTag inner text.

◆ ToString()

ASPOSECPP_SHARED_API String System::Security::SecurityElement::ToString ( ) const
overridevirtual

Converts tag to string.

Returns
XML code.

Reimplemented from System::Object.