예제 #1
0
		public object Get (DtoHash req)
		{
			Tuple<Status, string> tuple = Scheduler.GetStatus (req.id);
			List<string> list = new List<string> ();
			list.Add (tuple.Item1.ToString ());
			list.Add(tuple.Item2);

			return new DtoHashStatusResponse (list);
		}
예제 #2
0
		public object Post (DtoHash req)
		{
			string result;

			//req.hash = "49d02d55ad10973b7b9d0dc9eba7fdf0";

			if (req.sum == "md5")
				result = Scheduler.AddJob (StringToByteArray (req.hash), Common.HashType.MD5, req.maxLength);
			else if (req.sum == "sha1")
				result = Scheduler.AddJob (StringToByteArray (req.hash), Common.HashType.SHA1, req.maxLength);
			else
				result = "error";
			//Console.WriteLine ("id = " + result);

			return new DtoHashIDResponse (result);
		}