ChildContextualCreatorExtensionsInChildTResult, TScope, TChild Method (IChildContextualCreatorTScope, TChild, TScope, FuncTChild, TaskTResult) |
Creates a new child contextual from parent
with an access scope of subScope and
executes content
with the new created child contextual.
After content has finished,
the child contextual is disposed.
The result of content is passed as result.
Namespace: AccessFlowAssembly: AccessFlow (in AccessFlow.dll) Version: 1.0.0.2 (1.0.0.2)
Syntaxpublic static Task<TResult> InChild<TResult, TScope, TChild>(
this IChildContextualCreator<TScope, TChild> parent,
TScope subScope,
Func<TChild, Task<TResult>> content
)
where TChild : IDisposable
<ExtensionAttribute>
Public Shared Function InChild(Of TResult, TScope, TChild As IDisposable) (
parent As IChildContextualCreator(Of TScope, TChild),
subScope As TScope,
content As Func(Of TChild, Task(Of TResult))
) As Task(Of TResult)
public:
[ExtensionAttribute]
generic<typename TResult, typename TScope, typename TChild>
where TChild : IDisposable
static Task<TResult>^ InChild(
IChildContextualCreator<TScope, TChild>^ parent,
TScope subScope,
Func<TChild, Task<TResult>^>^ content
)
[<ExtensionAttribute>]
static member InChild :
parent : IChildContextualCreator<'TScope, 'TChild> *
subScope : 'TScope *
content : Func<'TChild, Task<'TResult>> -> Task<'TResult> when 'TChild : IDisposable
Parameters
- parent
- Type: AccessFlowIChildContextualCreatorTScope, TChild
The IChildContextualCreatorTScope, TChild
to create the child contextual,
typically another access contextual. - subScope
- Type: TScope
The access scope of the created child contextual.
- content
- Type: SystemFuncTChild, TaskTResult
The function operating on the new created child contextual.
Type Parameters
- TResult
-
The type of the result of content.
- TScope
- The type of the access scope.
- TChild
-
The type of the child contextual.
Return Value
Type:
TaskTResult
The asynchrous result of
content.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IChildContextualCreatorTScope,
TChild. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also