public static void SaveTo(string filename, Credentials token)
 {
     using (var sw = new StreamWriter(filename, false)) {
         sw.WriteLine(token.ProjectId);
         sw.WriteLine(token.Token);
     }
 }
Example #2
0
        public Client(Credentials credentials, string proto = PROTO_DEFAULT, string host = HOST_DEFAULT, int port = PORT_DEFAULT)
        {
            this.Host = host;
            this.Port = port;

            _serializer = new JavaScriptSerializer();
            _rest = new RESTadapter(credentials, proto, host, port, _serializer);
        }
Example #3
0
 public RESTadapter(Credentials credentials, string proto, string host, int port, JavaScriptSerializer serializer)
 {
     _credentials = credentials;
     _proto = proto;
     _host = host;
     _port = port;
     _serializer = serializer;
 }
Example #4
0
 public IronMQUnitTest()
 {
     _credentials = CredentialsRepository.LoadFrom("ironmq.credentials.txt");
     Assert.IsFalse(string.IsNullOrWhiteSpace(_credentials.ProjectId));
     Assert.IsFalse(string.IsNullOrWhiteSpace(_credentials.Token));
 }