C# 클래스 ModernApp4Me.WP8.WebService.M4MWebServiceCaller

A basis class for making web service calls easier which uses RestSharp.Portable on Windows Phone. When invoking an HTTP method, the caller goes through the following workflow: The M4MWebServiceCaller.ExecuteHttpRequest() methods is invoked : if the response HttpStatusCode is OK, the body is returned ad a string. if the HttpStatusCode is not OK, the private method M4MWebServiceCaller.OnHttpStatusCodeNotOk() is invoked. if the HttpStatusCode is NotFound and the DeviceNetworkInformation.IsNetworkAvailable is false, a M4MConnectivityException is thrown. Otherwife, a M4MCallException is thrown.
상속: ModernApp4Me.Core.WebService.M4MBaseWebServiceCaller
파일 보기 프로젝트 열기: smartnsoft/ModernApp4Me

보호된 메소드들

메소드 설명
M4MWebServiceCaller ( string baseUrl ) : System.Net

Basis constructor.

OnHttpStatusCodeNotOk ( string resource, HttpStatusCode statusCode ) : void

Private function that raises an exception when the result code to a web method id not OK (not 20X).

메소드 상세

M4MWebServiceCaller() 보호된 메소드

Basis constructor.
protected M4MWebServiceCaller ( string baseUrl ) : System.Net
baseUrl string The base URL of the web service API
리턴 System.Net

OnHttpStatusCodeNotOk() 보호된 메소드

Private function that raises an exception when the result code to a web method id not OK (not 20X).
protected OnHttpStatusCodeNotOk ( string resource, HttpStatusCode statusCode ) : void
resource string The uri
statusCode HttpStatusCode the
리턴 void