Asposecpplib
System::Web::Services::Protocols::WebClientProtocol Class Reference

This base class is used in all XML Web service client proxies that were created using ASP.NET. 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.

Inherited by System::Web::Services::Protocols::HttpWebClientProtocol.

Public Member Functions

System::SharedPtr< Uriget_Uri ()
 Gets the XML Web service URI. More...
 
void set_Uri (System::SharedPtr< Uri > uri)
 Sets the XML Web service URI. More...
 
String get_ConnectionGroupName ()
 Gets the name of the connection group. More...
 
void set_ConnectionGroupName (String value)
 Sets the name of the connection group. More...
 
System::SharedPtr< Net::ICredentialsget_Credentials ()
 Gets the authentication information. More...
 
void set_Credentials (System::SharedPtr< Net::ICredentials > value)
 Sets the authentication information. More...
 
bool get_PreAuthenticate ()
 Gets a value that indicates if pre-authentication is enabled. More...
 
void set_PreAuthenticate (bool value)
 Sets a value that indicates if pre-authentication is enabled. More...
 
System::SharedPtr< Text::Encodingget_RequestEncoding ()
 Gets the encoding that is used to make the client requests. More...
 
void set_RequestEncoding (System::SharedPtr< Text::Encoding > value)
 Sets the encoding that is used to make the client requests. More...
 
int32_t get_Timeout ()
 Gets the timespan to wait before the request times out. More...
 
void set_Timeout (int32_t value)
 Sets the timespan to wait before the request times out. More...
 
String get_Url ()
 Gets the XML Web service URL. More...
 
void set_Url (String value)
 Sets the XML Web service URL. More...
 
bool get_UseDefaultCredentials ()
 Gets a value that indicates if the 'Credential' property is equal to the 'DefaultCredentials' property. More...
 
void set_UseDefaultCredentials (bool value)
 Sets a value that indicates if the 'Credential' property is equal to the 'DefaultCredentials' property. More...
 
virtual void Abort ()
 Cancels the request. More...
 
- 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...
 

Public Attributes

System::SharedPtr< Uriuri
 The XML Web service URI. More...
 

Protected Member Functions

 WebClientProtocol ()
 Constructs a new instance. More...
 
virtual System::SharedPtr< Net::WebRequestGetWebRequest (System::SharedPtr< Uri > uri)
 Creates a WebRequest-class instance for the specified URI. More...
 
virtual System::SharedPtr< Net::WebResponseGetWebResponse (System::SharedPtr< Net::WebRequest > request)
 Creates a WebResponse-class instance for the specified request. More...
 
virtual System::SharedPtr< Net::WebResponseGetWebResponse (System::SharedPtr< Net::WebRequest > request, System::SharedPtr< IAsyncResult > result)
 Creates a WebResponse-class instance for the specified request. More...
 

Static Protected Member Functions

static void AddToCache (const TypeInfo &type, System::SharedPtr< Object > value)
 Adds the specified instance of the client protocol handler to the internal cache. More...
 
static System::SharedPtr< ObjectGetFromCache (const TypeInfo &type)
 Gets the client protocol handler from the cache. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. 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...
 
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

This base class is used in all XML Web service client proxies that were created using ASP.NET. 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

◆ WebClientProtocol()

System::Web::Services::Protocols::WebClientProtocol::WebClientProtocol ( )
protected

Constructs a new instance.

Member Function Documentation

◆ Abort()

virtual void System::Web::Services::Protocols::WebClientProtocol::Abort ( )
virtual

Cancels the request.

◆ AddToCache()

static void System::Web::Services::Protocols::WebClientProtocol::AddToCache ( const TypeInfo type,
System::SharedPtr< Object value 
)
staticprotected

Adds the specified instance of the client protocol handler to the internal cache.

Parameters
typeThe type of the specified instance of the client protocol handler.
valueThe client protocol handler to add.

◆ get_ConnectionGroupName()

String System::Web::Services::Protocols::WebClientProtocol::get_ConnectionGroupName ( )

Gets the name of the connection group.

Returns
The name of the connection group.

◆ get_Credentials()

System::SharedPtr<Net::ICredentials> System::Web::Services::Protocols::WebClientProtocol::get_Credentials ( )

Gets the authentication information.

Returns
The authentication information.

◆ get_PreAuthenticate()

bool System::Web::Services::Protocols::WebClientProtocol::get_PreAuthenticate ( )

Gets a value that indicates if pre-authentication is enabled.

Returns
A value that indicates if pre-authentication is enabled.

◆ get_RequestEncoding()

System::SharedPtr<Text::Encoding> System::Web::Services::Protocols::WebClientProtocol::get_RequestEncoding ( )

Gets the encoding that is used to make the client requests.

Returns
The encoding that is used to make the client requests.

◆ get_Timeout()

int32_t System::Web::Services::Protocols::WebClientProtocol::get_Timeout ( )

Gets the timespan to wait before the request times out.

Returns
The timespan to wait before the request times out.

◆ get_Uri()

System::SharedPtr<Uri> System::Web::Services::Protocols::WebClientProtocol::get_Uri ( )

Gets the XML Web service URI.

Returns
The XML Web service URI.

◆ get_Url()

String System::Web::Services::Protocols::WebClientProtocol::get_Url ( )

Gets the XML Web service URL.

Returns
The XML Web service URL.

◆ get_UseDefaultCredentials()

bool System::Web::Services::Protocols::WebClientProtocol::get_UseDefaultCredentials ( )

Gets a value that indicates if the 'Credential' property is equal to the 'DefaultCredentials' property.

Returns
The value that indicates if the 'Credential' property is equal to the 'DefaultCredentials' property.
Exceptions
System::NotImplementedException

◆ GetFromCache()

static System::SharedPtr<Object> System::Web::Services::Protocols::WebClientProtocol::GetFromCache ( const TypeInfo type)
staticprotected

Gets the client protocol handler from the cache.

Parameters
typeThe type of the client protocol handler.

◆ GetWebRequest()

virtual System::SharedPtr<Net::WebRequest> System::Web::Services::Protocols::WebClientProtocol::GetWebRequest ( System::SharedPtr< Uri uri)
protectedvirtual

Creates a WebRequest-class instance for the specified URI.

Parameters
uriThe URI that is used to initialize a new WebRequest-class instance.
Returns
A newly created WebRequest-class instance.

Reimplemented in System::Web::Services::Protocols::HttpWebClientProtocol.

◆ GetWebResponse() [1/2]

virtual System::SharedPtr<Net::WebResponse> System::Web::Services::Protocols::WebClientProtocol::GetWebResponse ( System::SharedPtr< Net::WebRequest request)
protectedvirtual

Creates a WebResponse-class instance for the specified request.

Parameters
requestThe request that is used to initialize a new WebResponse-class instance.
Returns
A newly created WebRequest-class instance.

Reimplemented in System::Web::Services::Protocols::HttpWebClientProtocol.

◆ GetWebResponse() [2/2]

virtual System::SharedPtr<Net::WebResponse> System::Web::Services::Protocols::WebClientProtocol::GetWebResponse ( System::SharedPtr< Net::WebRequest request,
System::SharedPtr< IAsyncResult result 
)
protectedvirtual

Creates a WebResponse-class instance for the specified request.

Parameters
requestThe request that is used to initialize a new WebResponse-class instance.
resultIAsyncResult that will be passed into the 'EndGetResponse' method when the response will be completed.
Returns
A newly created WebRequest-class instance.

Reimplemented in System::Web::Services::Protocols::HttpWebClientProtocol.

◆ set_ConnectionGroupName()

void System::Web::Services::Protocols::WebClientProtocol::set_ConnectionGroupName ( String  value)

Sets the name of the connection group.

Parameters
valueThe value that must be set.

◆ set_Credentials()

void System::Web::Services::Protocols::WebClientProtocol::set_Credentials ( System::SharedPtr< Net::ICredentials value)

Sets the authentication information.

Parameters
valueThe authentication information.

◆ set_PreAuthenticate()

void System::Web::Services::Protocols::WebClientProtocol::set_PreAuthenticate ( bool  value)

Sets a value that indicates if pre-authentication is enabled.

Parameters
valueThe value that must be set.

◆ set_RequestEncoding()

void System::Web::Services::Protocols::WebClientProtocol::set_RequestEncoding ( System::SharedPtr< Text::Encoding value)

Sets the encoding that is used to make the client requests.

Parameters
valueThe value that must be set.

◆ set_Timeout()

void System::Web::Services::Protocols::WebClientProtocol::set_Timeout ( int32_t  value)

Sets the timespan to wait before the request times out.

Parameters
valueThe value that must be set.

◆ set_Uri()

void System::Web::Services::Protocols::WebClientProtocol::set_Uri ( System::SharedPtr< Uri uri)

Sets the XML Web service URI.

Parameters
uriThe URI that must be set.

◆ set_Url()

void System::Web::Services::Protocols::WebClientProtocol::set_Url ( String  value)

Sets the XML Web service URL.

Parameters
valueThe URL that must be set.

◆ set_UseDefaultCredentials()

void System::Web::Services::Protocols::WebClientProtocol::set_UseDefaultCredentials ( bool  value)

Sets a value that indicates if the 'Credential' property is equal to the 'DefaultCredentials' property.

Parameters
valueThe value that must be set.
Exceptions
System::NotImplementedException

Member Data Documentation

◆ uri

System::SharedPtr<Uri> System::Web::Services::Protocols::WebClientProtocol::uri

The XML Web service URI.