40 instantiations of JSInvokableAttribute
Aspire.Dashboard (6)
Components\Controls\Chart\PlotlyChart.razor.cs (1)
219
[
JSInvokable
]
Components\Dialogs\AssistantModalDialog.razor.cs (1)
150
[
JSInvokable
]
Components\Pages\Resources.razor.cs (2)
403
[
JSInvokable
]
416
[
JSInvokable
]
Components\Resize\BrowserDimensionWatcher.cs (1)
65
[
JSInvokable
]
ShortcutManager.cs (1)
25
[
JSInvokable
]
Microsoft.AspNetCore.Components.Web (7)
Forms\InputFile\InputFileJsCallbacksRelay.cs (1)
23
[
JSInvokable
]
Virtualization\VirtualizeJsInterop.cs (2)
33
[
JSInvokable
]
39
[
JSInvokable
]
WebRenderer.cs (4)
160
[
JSInvokable
]
170
[
JSInvokable
] // Linker preserves this if you call RootComponents.Add
174
[
JSInvokable
] // Linker preserves this if you call RootComponents.Add
178
[
JSInvokable
] // Linker preserves this if you call RootComponents.Add
Microsoft.AspNetCore.Components.WebAssembly (2)
Infrastructure\JSInteropMethods.cs (2)
27
[
JSInvokable
(nameof(NotifyLocationChanged))]
36
[
JSInvokable
(nameof(NotifyLocationChangingAsync))]
Microsoft.JSInterop.Tests (24)
Infrastructure\DotNetDispatcherTest.cs (24)
891
[
JSInvokable
("MethodOnInternalType")] public void MyMethod() { }
899
[
JSInvokable
("PrivateMethod")] private static void MyPrivateMethod() { }
900
[
JSInvokable
("ProtectedMethod")] protected static void MyProtectedMethod() { }
904
[
JSInvokable
("InvocableStaticVoid")]
910
[
JSInvokable
("InvocableStaticNonVoid")]
914
[
JSInvokable
("InvocableStaticNonVoidAlias1"),
JSInvokable
("InvocableStaticNonVoidAlias2")]
918
[
JSInvokable
("InvocableStaticWithParams")]
934
[
JSInvokable
(nameof(IncorrectDotNetObjectRefUsage))]
938
[
JSInvokable
]
942
[
JSInvokable
]
948
[
JSInvokable
]
965
[
JSInvokable
]
985
[
JSInvokable
]
1004
[
JSInvokable
]
1022
[
JSInvokable
]
1041
[
JSInvokable
]
1047
[
JSInvokable
]
1057
[
JSInvokable
] public string EchoStringParameter(string input) => input;
1058
[
JSInvokable
] public TValue EchoParameter(TValue input) => input;
1063
[
JSInvokable
,
JSInvokable
("Alias")] public string MultipleJSInvokableAttributesInstance(string input) => input;
1068
[
JSInvokable
("StaticGenericMethod")] public static string StaticGenericMethod<TValue>(TValue input) => input.ToString();
1069
[
JSInvokable
("InstanceGenericMethod")] public string GenericMethod<TValue>(TValue input) => input.ToString();
Wasm.Performance.TestApp (1)
WasmMemory.cs (1)
10
[
JSInvokable
]
13 references to JSInvokableAttribute
Microsoft.JSInterop (11)
Infrastructure\DotNetDispatcher.cs (8)
363
throw new ArgumentException($"The assembly '{assemblyKey.AssemblyName}' does not contain a public invokable method with [{nameof(
JSInvokableAttribute
)}(\"{methodIdentifier}\")].");
396
throw new ArgumentException($"The type '{type.Name}' does not contain a public invokable method with [{nameof(
JSInvokableAttribute
)}(\"{methodIdentifier}\")].");
405
if (method.ContainsGenericParameters || !method.IsDefined(typeof(
JSInvokableAttribute
), inherit: false))
410
foreach (
var
attr in method.GetCustomAttributes<
JSInvokableAttribute
>(false))
444
if (method.ContainsGenericParameters || !method.IsDefined(typeof(
JSInvokableAttribute
), inherit: false))
449
foreach (
var
attr in method.GetCustomAttributes<
JSInvokableAttribute
>(false))
Infrastructure\DotNetInvocationInfo.cs (1)
33
/// Gets the identifier of the method to be invoked. This is the value specified in the <see cref="
JSInvokableAttribute
"/>.
JSInvokableAttribute.cs (2)
24
/// Constructs an instance of <see cref="
JSInvokableAttribute
"/> without setting
32
/// Constructs an instance of <see cref="
JSInvokableAttribute
"/> using the specified
Microsoft.JSInterop.Tests (2)
Infrastructure\DotNetDispatcherTest.cs (2)
544
Assert.Contains($"The assembly '{thisAssemblyName}' does not contain a public invokable method with [{nameof(
JSInvokableAttribute
)}(\"{methodIdentifier}\")].", ex.Message);
559
Assert.Contains($"The type 'GenericType`1' does not contain a public invokable method with [{nameof(
JSInvokableAttribute
)}(\"{methodIdentifier}\")].", ex.Message);