src/Microsoft/JSInterop/0.Core/src/Component/Assigners/JSCustomFacadeWrappingAssigner.cs
/// <summary>
/// Assigns component property with returning non-null JavaScript module facade.
/// </summary>
/// <returns>null/default or the JavaScript module facade.</returns>
Assigns component property with returning non-null JavaScript module facade.
Assigns component property with returning non - null JavaScript module facade .
public virtual ValueTask AssignValueAsync(IMemberDefinition componentMember, ValueAssignerContext context)
        {
            if (context.ValueResult.TryGetNull(out var disposable)) {
                goto @return;
            }
            if (!(disposable is IJSObjectReferenceFacade jsObjectReferenceFacade)) {
                goto @return;
            }
            if (!componentMember.IsAttributeDefined<ActivateCustomFacadeAttribute>()) {
                goto @return;
            }
            var customFacade = jsCustomFacadeActivator.CreateInstance(jsObjectReferenceFacade, componentMember.MemberType);
            context.SetValueResult(customFacade);
            @return:
            return ValueTask.CompletedTask;
        }
public virtual ValueTask AssignValueAsync ( IMemberDefinition componentMember , ValueAssignerContext context ) { if ( context . ValueResult . TryGetNull ( out var disposable ) ) { goto @return ; } if ( ! ( disposable is IJSObjectReferenceFacade jsObjectReferenceFacade ) ) { goto @return ; } if ( ! componentMember . IsAttributeDefined < ActivateCustomFacadeAttribute > ( ) ) { goto @return ; } var customFacade = jsCustomFacadeActivator . CreateInstance ( jsObjectReferenceFacade , componentMember . MemberType ) ; context . SetValueResult ( customFacade ) ; @return : return ValueTask . CompletedTask ; }
Assigns component property with returning non-null JavaScript module facade.
Assigns component property with returning non - null JavaScript module facade .
null/default or the JavaScript module facade.
null / default or the JavaScript module facade .
componentMember
IMemberDefinition
context
ValueAssignerContext