How it works

The class library was written as a Portable Class Library. This eventually means that a selected set of .NET Framework can actually link to it without change source code. The supported fremworks are:
  • .NET Framework 3 - 4.5
  • Silverlight 4/5
  • Windows Phone 7.1 / 8
  • Windows Store App

As long as you're writing code for the above platforms, the PCL will work seamless.

The library is also compatibile with Visual Studio 2012 async / await new pattern. It will not work on Visual Studio 2010, as it doesn't support awaitable calls. Because of this, it have dependencies on Microsoft BCL, AWAIT/ASYNC and HTTP Client libraries. It can easly installed using NuGET from Visual Studio 2012.

Basically, the PCL exposes a set of client classes that manage the connection between the container application and BNET. Each client can connect only to one BNET Region per time, and the region is specified at object allocation time.

Once the connection is up, the client exposes specified function for each BNET API functionality. For example, we can ask BNET for a specified character using GetCharacterProfileAsync public method. This will fetch selected character information from the WoW servers, and return a BNETResponse containing eventually error information or the character data, as WoWCharacter.

The disconnection of the client is not needed, as REST calls are per-call. The HTTP session will expire automatically.

Last edited Jul 30, 2013 at 12:51 PM by XMaverick, version 1


No comments yet.