private void InitializeCallback() { if (_callback == null && _asyncOperation != null) { _callback = _asyncOperation.ToSerializableCallback(); } }
internal List <object> GetContinuationsCallbacks() { if (!IsCompleted) { lock (_continuations) { if (!IsCompleted) { if (_continuations.Count == 0) { return(null); } var list = new List <object>(_continuations.Count); foreach (IAsyncOperationInternal continuation in _continuations) { ISerializableCallback callback = continuation.ToSerializableCallback(); if (callback != null) { list.Add(callback); } } if (list.Count == 0) { return(null); } return(list); } } } return(null); }
public ISerializableCallback ToSerializableCallback() { if (_serializableCallback == null) { _serializableCallback = new AwaiterSerializableCallback(_continuation, _hasStateMachine.StateMachine, _resultType.AssemblyQualifiedName, _isUiThread, _asyncOperation); } return(_serializableCallback); }
public AsyncOperationSerializableCallback(ISerializableCallback mainCallback, string inputType, string outputType, bool isFunc, List <object> callbacks) { MainCallback = mainCallback; InputType = inputType; OutputType = outputType; Callbacks = callbacks; IsFunc = isFunc; }
public AsyncOperationSerializableCallback(ISerializableCallback mainCallback, string inputType, string outputType, bool isFunc, List<object> callbacks) { MainCallback = mainCallback; InputType = inputType; OutputType = outputType; Callbacks = callbacks; IsFunc = isFunc; }
public ISerializableCallback ToSerializableCallback() { if (_hasCallback) { return(_serializableCallback); } _hasCallback = true; _serializableCallback = ToolkitServiceProvider.OperationCallbackFactory.CreateSerializableCallback(_delegate); return(_serializableCallback); }
private void InitializeCallback() { if (_callback == null && _asyncOperation != null) _callback = _asyncOperation.ToSerializableCallback(); }