コード例 #1
0
		public object Get(string key)
		{
			Get get = new Get(new Key(key, hasher));
			CommandExecuter ce = new CommandExecuter(instances);
			try
			{
				ce.Execute(get);
				return get.RetrievedObject;
			}
			catch
			{
				return null;
			}
		}
コード例 #2
0
		public object[] MultiGet(string[] keys)
		{
			Get[] gets = new Get[keys.Length];
			for (int i = 0; i < keys.Length; i++)
			{
				gets[i] = new Get(new Key(keys[i], hasher));
			}
			CommandExecuter ce = new CommandExecuter(instances);
			try
			{
				ce.ExecuteCommands(gets);
			}
			catch { }
			object[] returnedObjects = new object[keys.Length];
			for (int i = 0; i < gets.Length; i++)
			{
				returnedObjects[i] = gets[i].RetrievedObject;
			}
			return returnedObjects;
		}