Exemple #1
0
	static void Describe (object target_obj, string message) {
		Console.WriteLine ();
		IMessageStore store = new CTSMessageTarget (target_obj);
		MessageInfo info = store.DescribeMessage (message);
		if (info == null) {
			Console.WriteLine ("{0} does not know about the message \"{1}\".", target_obj, message);
			return;
		}
		Console.WriteLine ("Target: {0}", target_obj);
		Console.WriteLine ("Message: {0}", info.message);
		Console.WriteLine ("Arguments: ({0}, {1}, {2})", info.min_argc, info.max_argc, info.default_argc);
	}
Exemple #2
0
	static object Ask (object target_obj, string message, params object[] args) {
		object result = null;
		IMessageTarget target = new CTSMessageTarget (target_obj);
		result = target.SendMessage (new LogoContext (null), message, args);
		return result;
	}