System.AppDomain.AppDomain.InvokeInDomain C# (CSharp) Méthode

InvokeInDomain() static private méthode

static private InvokeInDomain ( AppDomain domain, MethodInfo method, object obj, object args ) : object
domain AppDomain
method System.Reflection.MethodInfo
obj object
args object
Résultat object
		internal static object InvokeInDomain (AppDomain domain, MethodInfo method, object obj, object [] args)
		{
			AppDomain current = CurrentDomain;
			bool pushed = false;

			try {
				Exception exc;
				InternalPushDomainRef (domain);
				pushed = true;
				InternalSetDomain (domain);
				object o = ((MonoMethod) method).InternalInvoke (obj, args, out exc);
				if (exc != null)
					throw exc;
				return o;
			}
			finally {
				InternalSetDomain (current);
				if (pushed)
					InternalPopDomainRef ();
			}
		}