4 instantiations of ElementReference
Microsoft.AspNetCore.Components (1)
ElementReference.cs (1)
49=> new ElementReference(CreateUniqueId(), context);
Microsoft.AspNetCore.Components.Server (1)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
48return new ElementReference(id, _elementReferenceContext);
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
48return new ElementReference(id, _elementReferenceContext);
Microsoft.AspNetCore.Components.WebView (1)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
48return new ElementReference(id, _elementReferenceContext);
79 references to ElementReference
Microsoft.AspNetCore.Components (17)
ComponentBase.cs (2)
155/// updating (for example, after elements have been added to the browser DOM). Any <see cref="ElementReference" /> 177/// updating (for example, after elements have been added to the browser DOM). Any <see cref="ElementReference" />
ElementReference.cs (6)
16/// Gets a unique identifier for <see cref="ElementReference" />. 30/// Instantiates a new <see cref="ElementReference" />. 32/// <param name="id">A unique identifier for this <see cref="ElementReference"/>.</param> 41/// Instantiates a new <see cref="ElementReference"/>. 43/// <param name="id">A unique identifier for this <see cref="ElementReference"/>.</param> 48internal static ElementReference CreateWithUniqueId(ElementReferenceContext? context)
ElementReferenceContext.cs (1)
7/// Context for an <see cref="ElementReference"/>.
Rendering\RenderTreeBuilder.cs (1)
592public void AddElementReferenceCapture(int sequence, Action<ElementReference> elementReferenceCaptureAction)
RenderTree\RenderTreeDiffBuilder.cs (2)
987var newElementReference = ElementReference.CreateWithUniqueId(diffContext.Renderer.ElementReferenceContext);
RenderTree\RenderTreeFrame.cs (4)
209[FieldOffset(24)] internal Action<ElementReference> ElementReferenceCaptureActionField; 221public Action<ElementReference> ElementReferenceCaptureAction => ElementReferenceCaptureActionField; 371private RenderTreeFrame(int sequence, Action<ElementReference> elementReferenceCaptureAction, string elementReferenceCaptureId) 411internal static RenderTreeFrame ElementReferenceCapture(int sequence, Action<ElementReference> elementReferenceCaptureAction)
RenderTree\RenderTreeFrameArrayBuilder.cs (1)
93public void AppendElementReferenceCapture(int sequence, Action<ElementReference> elementReferenceCaptureAction)
Microsoft.AspNetCore.Components.Authorization.Tests (1)
src\Components\Shared\test\AssertFrame.cs (1)
123public static void ElementReferenceCapture(RenderTreeFrame frame, Action<ElementReference> action, int? sequence = null)
Microsoft.AspNetCore.Components.Forms.Tests (1)
src\Components\Shared\test\AssertFrame.cs (1)
123public static void ElementReferenceCapture(RenderTreeFrame frame, Action<ElementReference> action, int? sequence = null)
Microsoft.AspNetCore.Components.QuickGrid (1)
QuickGrid.razor.cs (1)
110private ElementReference _tableReference;
Microsoft.AspNetCore.Components.Server (3)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (3)
9internal sealed class ElementReferenceJsonConverter : JsonConverter<ElementReference> 20public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 51public override void Write(Utf8JsonWriter writer, ElementReference value, JsonSerializerOptions options)
Microsoft.AspNetCore.Components.Server.Tests (10)
ElementReferenceJsonConverterTest.cs (10)
25var elementReference = ElementReference.CreateWithUniqueId(ElementReferenceContext); 43var id = ElementReference.CreateWithUniqueId(ElementReferenceContext).Id; 50var elementReference = Converter.Read(ref reader, typeof(ElementReference), new JsonSerializerOptions()); 60var id = ElementReference.CreateWithUniqueId(ElementReferenceContext).Id; 70var elementReference = Converter.Read(ref reader, typeof(ElementReference), new JsonSerializerOptions()); 88Converter.Read(ref reader, typeof(ElementReference), new JsonSerializerOptions()); 107Converter.Read(ref reader, typeof(ElementReference), new JsonSerializerOptions());
Microsoft.AspNetCore.Components.Tests (10)
Rendering\RenderTreeBuilderTest.cs (4)
714Action<ElementReference> referenceCaptureAction = elementReference => { }; 782Action<ElementReference> referenceCaptureAction1 = elementReference => { }; 783Action<ElementReference> referenceCaptureAction2 = elementReference => { }; 1837var capture = (Action<ElementReference>)((_) => { });
RenderTreeDiffBuilderTest.cs (5)
1841ElementReference ref1 = default, ref2 = default; 1842Action<ElementReference> capture1 = val => { ref1 = val; }; 1843Action<ElementReference> capture2 = val => { ref2 = val; }; 1882ElementReference ref1 = default; 1883Action<ElementReference> capture1 = val => { ref1 = val; refWriteCount++; };
src\Components\Shared\test\AssertFrame.cs (1)
123public static void ElementReferenceCapture(RenderTreeFrame frame, Action<ElementReference> action, int? sequence = null)
Microsoft.AspNetCore.Components.Web (29)
ElementReferenceExtensions.cs (6)
9/// Static class that adds extension methods to <see cref="ElementReference"/>. 14/// Gives focus to an element given its <see cref="ElementReference"/>. 18public static ValueTask FocusAsync(this ElementReference elementReference) => elementReference.FocusAsync(preventScroll: false); 21/// Gives focus to an element given its <see cref="ElementReference"/>. 32public static ValueTask FocusAsync(this ElementReference elementReference, bool preventScroll) 44internal static IJSRuntime GetJSRuntime(this ElementReference elementReference)
Forms\InputCheckbox.cs (2)
24/// Gets or sets the associated <see cref="ElementReference"/>. 29[DisallowNull] public ElementReference? Element { get; protected set; }
Forms\InputDate.cs (2)
43/// Gets or sets the associated <see cref="ElementReference"/>. 48[DisallowNull] public ElementReference? Element { get; protected set; }
Forms\InputFile.cs (3)
15private ElementReference _inputFileElement; 35/// Gets or sets the associated <see cref="ElementReference"/>. 41public ElementReference? Element
Forms\InputFile\BrowserFileStream.cs (2)
12private readonly ElementReference _inputFileElement; 24ElementReference inputFileElement,
Forms\InputNumber.cs (2)
44/// Gets or sets the associated <see cref="ElementReference"/>. 49[DisallowNull] public ElementReference? Element { get; protected set; }
Forms\InputRadio.cs (2)
39/// Gets or sets the associated <see cref="ElementReference"/>. 44[DisallowNull] public ElementReference? Element { get; protected set; }
Forms\InputSelect.cs (2)
31/// Gets or sets the <c>select</c> <see cref="ElementReference"/>. 36[DisallowNull] public ElementReference? Element { get; protected set; }
Forms\InputText.cs (2)
24/// Gets or sets the associated <see cref="ElementReference"/>. 29[DisallowNull] public ElementReference? Element { get; protected set; }
Forms\InputTextArea.cs (2)
24/// Gets or sets the associated <see cref="ElementReference"/>. 29[DisallowNull] public ElementReference? Element { get; protected set; }
Virtualization\Virtualize.cs (2)
20private ElementReference _spacerBefore; 22private ElementReference _spacerAfter;
Virtualization\VirtualizeJsInterop.cs (2)
27public async ValueTask InitializeAsync(ElementReference spacerBefore, ElementReference spacerAfter)
Microsoft.AspNetCore.Components.Web.Tests (1)
src\Components\Shared\test\AssertFrame.cs (1)
123public static void ElementReferenceCapture(RenderTreeFrame frame, Action<ElementReference> action, int? sequence = null)
Microsoft.AspNetCore.Components.WebAssembly (3)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (3)
9internal sealed class ElementReferenceJsonConverter : JsonConverter<ElementReference> 20public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 51public override void Write(Utf8JsonWriter writer, ElementReference value, JsonSerializerOptions options)
Microsoft.AspNetCore.Components.WebView (3)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (3)
9internal sealed class ElementReferenceJsonConverter : JsonConverter<ElementReference> 20public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 51public override void Write(Utf8JsonWriter writer, ElementReference value, JsonSerializerOptions options)