Show / Hide Table of Contents

Class BlazorExtensions

Useful extensions while working with Microsoft.JSInterop methods like getting an object reference or a global reference to e. g. window

Inheritance
System.Object
BlazorExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Base.Imp.Blazor
Assembly: Fusee.Engine.Imp.Graphics.Blazor.dll
Syntax
public static class BlazorExtensions

Fields

Runtime

Javascript runtime

Declaration
public static IJSRuntime Runtime
Field Value
Type Description
IJSRuntime

Methods

GetGlobalObject<T>(IJSInProcessRuntime, String)

Returns a global javascript object as

Declaration
public static T GetGlobalObject<T>(this IJSInProcessRuntime runtime, string objectToRetrive)
Parameters
Type Name Description
IJSInProcessRuntime runtime
System.String objectToRetrive
Returns
Type Description
T
Type Parameters
Name Description
T

GetGlobalObject<T>(IJSRuntime, String)

Returns a global javascript object as

Declaration
public static T GetGlobalObject<T>(this IJSRuntime runtime, string objectToRetrive)
Parameters
Type Name Description
IJSRuntime runtime
System.String objectToRetrive
Returns
Type Description
T
Type Parameters
Name Description
T

GetObjectProperty<T>(IJSInProcessObjectReference, String)

Returns the object property of a given javascript object (given as )

Declaration
public static T GetObjectProperty<T>(this IJSInProcessObjectReference reference, string property)
Parameters
Type Name Description
IJSInProcessObjectReference reference
System.String property
Returns
Type Description
T
Type Parameters
Name Description
T

GetObjectProperty<T>(IJSInProcessObjectReference[], String)

Returns the object properties of a given javascript object (given as )

Declaration
public static T GetObjectProperty<T>(this IJSInProcessObjectReference[] reference, string property)
Parameters
Type Name Description
IJSInProcessObjectReference[] reference
System.String property
Returns
Type Description
T
Type Parameters
Name Description
T

GetObjectProperty<T>(IJSObjectReference, IJSRuntime, String)

Returns the object properties of a given javascript object (given as )

Declaration
public static T GetObjectProperty<T>(this IJSObjectReference reference, IJSRuntime runtime, string property)
Parameters
Type Name Description
IJSObjectReference reference
IJSRuntime runtime
System.String property
Returns
Type Description
T
Type Parameters
Name Description
T

SetAttribute<T>(IJSInProcessObjectReference, String, T)

Sets the specified attribute (key/value pair) of a given javascript object (as )

Declaration
public static void SetAttribute<T>(this IJSInProcessObjectReference reference, string propertyIdentifier, T val)
Parameters
Type Name Description
IJSInProcessObjectReference reference
System.String propertyIdentifier
T val
Type Parameters
Name Description
T

SetObjectProperty<T>(IJSInProcessObjectReference, String, T)

Sets the specified object property (key/value pair) of a given javascript object (as )

Declaration
public static void SetObjectProperty<T>(this IJSInProcessObjectReference reference, string propertyIdentifier, T val)
Parameters
Type Name Description
IJSInProcessObjectReference reference
System.String propertyIdentifier
T val
Type Parameters
Name Description
T

SetObjectProperty<T>(IJSObjectReference, String, T)

Sets the specified object property (key/value pair) of a given javascript object (as )

Declaration
public static void SetObjectProperty<T>(this IJSObjectReference reference, string propertyIdentifier, T val)
Parameters
Type Name Description
IJSObjectReference reference
System.String propertyIdentifier
T val
Type Parameters
Name Description
T
Generated by DocFX
GitHub Repo
Back to top