src/Microsoft/JSInterop/0.Core/src/Component/Assigners/JSModuleActivatingAssigner.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 async ValueTask AssignValueAsync(IMemberDefinition componentMember, ValueAssignerContext context)
        {
            if (!JSModuleAttributeUtils.TryGetModuleNameOrPath<ActivateModuleAttribute, JSModuleAttribute>(componentMember, out var _, out var moduleNameOrPath)) {
                return;
            }
            var jsModule = await jsModuleActivator.CreateInstanceAsync(moduleNameOrPath);
            context.SetValueResult(jsModule);
        }
public virtual async ValueTask AssignValueAsync ( IMemberDefinition componentMember , ValueAssignerContext context ) { if ( ! JSModuleAttributeUtils . TryGetModuleNameOrPath < ActivateModuleAttribute , JSModuleAttribute > ( componentMember , out var _ , out var moduleNameOrPath ) ) { return ; } var jsModule = await jsModuleActivator . CreateInstanceAsync ( moduleNameOrPath ) ; context . SetValueResult ( jsModule ) ; }
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