Esempio n. 1
0
		/// <summary>
		/// Gets the log.
		/// </summary>
		/// <returns>The log.</returns>
		/// <param name="serverLogAddresses">Server log addresses.</param>
		/// <typeparam name="T">A Movuino Data type.</typeparam>
		public Stack<T> GetLog<T>(List<string> serverLogAddresses) where T : MovuinoData, new()
		{
			var res = new Stack<T> ();
			foreach (KeyValuePair<string, ServerLog> item in OSCHandler.Instance.Servers) {
				var serverName = item.Key;
				var serverLog = item.Value;
				foreach (var packet in serverLog.packets) {
					foreach (var logAddress in serverLogAddresses) {
						if (packet.Address == "/" + logAddress || packet.Address == logAddress) {
							res.Push (MovuinoData.CreateMovuinoData<T>(packet.Data));
						}
					}
				}
			}
			return res;
		}
Esempio n. 2
0
		public Stack<T> GetLog<T>() where T : MovuinoData, new()
		{
			var address = MovuinoData.CreateMovuinoData<T> ().movuinoAddress;
			return GetLog<T> (address);
		}