Пример #1
0
		internal IAsyncResult BeginInvokeInternal (Delegate method, object [] args, Control control) {
			AsyncMethodResult	result;
			AsyncMethodData		data;

			result = new AsyncMethodResult ();
			data = new AsyncMethodData ();

			data.Handle = control.GetInvokableHandle ();
			data.Method = method;
			data.Args = args;
			data.Result = result;

			if (!ExecutionContext.IsFlowSuppressed ()) {
				data.Context = ExecutionContext.Capture ();
			}

			XplatUI.SendAsyncMethod (data);
			return result;
		}
Пример #2
0
		internal IAsyncResult BeginInvokeInternal (Delegate method, object [] args, Control control) {
			AsyncMethodResult	result;
			AsyncMethodData		data;

			result = new AsyncMethodResult ();
			data = new AsyncMethodData ();

			data.Handle = control.GetInvokableHandle ();
			data.Method = method;
			data.Args = args;
			data.Result = result;

#if NET_2_0
			if (!ExecutionContext.IsFlowSuppressed ()) {
				data.Context = ExecutionContext.Capture ();
			}
#else
#if !MWF_ON_MSRUNTIME
			if (SecurityManager.SecurityEnabled) {
				data.Stack = CompressedStack.GetCompressedStack ();
			}
#endif
#endif

			XplatUI.SendAsyncMethod (data);
			return result;
		}