BaseLoginServiceExtension
Overview
The BaseLoginServiceExtensions class contains a set of methods used to simplify asynchronous LoginService calls using async/await pattern. Extension methods are available for the IBaseLoginService_Async interface and all interfaces inherited from it, including all services descended form the Data Abstract's BaseLoginService class.
Some platforms like Windows Phone support only asynchronous calls so the async/await asynchronous method calls pattern greatly simplifies and streamlines service methods calls code, f.e.
ILoginService_Async login = new LoginService_AsyncProxy(message, channel);
login.BeginLoginEx(
lLoginString,
delegate(IAsyncResult ar) { fLogged = login.EndLoginEx(ar); },
null);
can ve represented as
ILoginService_Async login = new LoginService_AsyncProxy(message, channel);
fLogged = await login.LoginExAsync(lLoginString);
Note: To call an extension method, you need to explicitly add the namespace this method is declared in to the using (C#)/Imports (VB.NET) or uses (Oxygene) clause.
Location
- Reference: RemObjects.DataAbstract.Async.dll
- Namespace: RemObjects.DataAbstract
Instance Methods
LoginExAsync
Asynchronously perform login operation using the LoginService.LoginEx method. This method accepts LoginEx string as parameter.
method LoginExAsync(loginString: String): Task<Boolean>
Task<Boolean> LoginExAsync(String loginString)
Function LoginExAsync(loginString As String) As Task<Boolean>
Parameters:
- loginString: LoginEx string
LogoutAsync
Asynchronously perform logout operation using the LoginService.LogOut method.
method LogoutAsync: Task
Task LogoutAsync()
Function LogoutAsync As Task