Commits

Anonymous committed 2d48676

Allowing attaching with token objects.

Comments (0)

Files changed (1)

FogbugzApi/Api.cs

 
         public static ISession Attach(Uri uri, string token)
         {
+            return Attach(uri, new Token(null, token));
+        }
+
+        public static ISession Attach(string uri, Token token)
+        {
+            return Attach(new Uri(uri), token);
+        }
+
+        public static ISession Attach(Uri uri, Token token)
+        {
             return new Session(
                 GetDefaultWebRequester(),
                 new ApiInfo() { ApiUri = new Uri(uri, DefaultApiPage) },
-                new Token(null, token));
+                token);
         }
 
         public static ISession Logon(string uri, string email, string password)