dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Serialization
JsSyncManager Class
Manages JavaScript synchronization for protobuf serialization of map components.
public static class JsSyncManager
Inheritance System.Object 🡒 JsSyncManager
Properties
JsSyncManager.AbortManagers Property
Collection of Reusable AbortManager instances for components.
public static System.Collections.Generic.Dictionary<Microsoft.JSInterop.IJSObjectReference,dymaptic.GeoBlazor.Core.Model.AbortManager> AbortManagers { get; set; }
Property Value
System.Collections.Generic.Dictionary<Microsoft.JSInterop.IJSObjectReference,AbortManager>
JsSyncManager.ProtoCollectionTypes Property
Dictionary mapping component types to their protobuf collection serialization record types.
public static System.Collections.Generic.Dictionary<System.Type,System.Type> ProtoCollectionTypes { get; set; }
Property Value
System.Collections.Generic.Dictionary<System.Type,System.Type>
JsSyncManager.ProtoContractTypes Property
Dictionary mapping component types to their protobuf serialization record types.
public static System.Collections.Generic.Dictionary<System.Type,System.Type> ProtoContractTypes { get; set; }
Property Value
System.Collections.Generic.Dictionary<System.Type,System.Type>
JsSyncManager.SerializableMethods Property
Dictionary of serializable methods keyed by type name.
public static System.Collections.Generic.Dictionary<string,dymaptic.GeoBlazor.Core.Serialization.SerializableMethodRecord[]> SerializableMethods { get; set; }
Property Value
System.Collections.Generic.Dictionary<System.String,SerializableMethodRecord[]>
Methods
JsSyncManager.Initialize() Method
Initializes the JsSyncManager by registering protobuf types and compiling the runtime model.
public static void Initialize();
JsSyncManager.InvokeJsMethod(this IJSObjectReference, bool, string, string, Nullable, CancellationToken, object[]) Method
Wrapper method to invoke a JS function that returns a value.
public static System.Threading.Tasks.Task<T> InvokeJsMethod<T>(this Microsoft.JSInterop.IJSObjectReference js, bool isServer, string method="", string className="", System.Nullable<long> maxAllowedSize=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken), params object?[] parameters);
Type parameters
T
Parameters
js Microsoft.JSInterop.IJSObjectReference
The
isServer System.Boolean
Boolean flag to identify if GeoBlazor is running in Blazor Server mode
method System.String
The name of the JS function to call.
className System.String
The name of the calling class.
maxAllowedSize System.Nullable<System.Int64>
The maximum size of the returned data.
cancellationToken System.Threading.CancellationToken
A CancellationToken to cancel an asynchronous operation.
parameters System.Object[]
The collection of parameters to pass to the JS call.
Returns
System.Threading.Tasks.Task<T>
JsSyncManager.InvokeVoidJsMethod(this IJSObjectReference, bool, string, string, CancellationToken, object[]) Method
Wrapper method to invoke a void JS function.
public static System.Threading.Tasks.Task InvokeVoidJsMethod(this Microsoft.JSInterop.IJSObjectReference js, bool isServer, string method="", string className="", System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken), params object?[] parameters);
Parameters
js Microsoft.JSInterop.IJSObjectReference
The
isServer System.Boolean
Boolean flag to identify if GeoBlazor is running in Blazor Server mode
method System.String
The name of the JS function to call.
className System.String
The name of the calling class.
cancellationToken System.Threading.CancellationToken
A CancellationToken to cancel an asynchronous operation.
parameters System.Object[]
The collection of parameters to pass to the JS call.