Up into the azure cloud

This commit is contained in:
2011-03-29 05:43:32 +03:00
parent 7de756e3f0
commit 84642c37ad
27 changed files with 2978 additions and 42 deletions
@@ -11,17 +11,25 @@ namespace MyFriendsAround.WP7.Service
{
private static int _timeOut = 10;
private static string baseUrl;
static ServiceAgent()
{
baseUrl = "http://myfriendsaround.cloudapp.net/myfriends";//live azure
//baseUrl = "http://127.0.0.1:8086/myfriends";//running in local azure emulator
//baseUrl = "http://localhost.:55672/myfriends";//for local asp.net mvc use
}
#region GetFriends
private static EventHandler<FriendsListEventArgs> friendscallback;
static EventHandler<FriendsListEventArgs> friendscallback;
public static void GetFriends(EventHandler<FriendsListEventArgs> callback)
{
var serializer = new Hammock.Serialization.HammockDataContractJsonSerializer();
RestClient client = new RestClient
{
Authority = "http://localhost.:55672/myfriends",
Authority = baseUrl,
Timeout = new TimeSpan(0, 0, 0, _timeOut),
Serializer = serializer,
Deserializer = serializer
@@ -69,7 +77,7 @@ namespace MyFriendsAround.WP7.Service
var serializer = new Hammock.Serialization.HammockDataContractJsonSerializer();
RestClient client = new RestClient
{
Authority = "http://localhost.:55672/myfriends",
Authority = baseUrl,
Timeout = new TimeSpan(0, 0, 0, _timeOut),
Serializer = serializer,
Deserializer = serializer