Click or drag to resize

IAssetProviderBeginGetAsset Method

Asynchronous get method.

Namespace:  Fusee.Base.Common
Assembly:  Fusee.Base.Common (in Fusee.Base.Common.dll) Version: 0.7.0.0 (0.7.0.0)
Syntax
C#
void BeginGetAsset(
	string id,
	GetCallback getCallback
)

Parameters

id
Type: SystemString
The identifier string.
getCallback
Type: Fusee.Base.CommonGetCallback
Code to call when the loading is done.
Remarks
The design doesn't follow any of the standard .NET asynchronous patterns like APM, EAP, or TAP. It's close to JavaScript where you just provide an "onLoad" decoder that's called when the object is retrieved and decoded. This is to enable AssetProviders to be implemented using standard JavaScript DOM objects like Image. See the article Interop with Other Asynchronous Patterns and Types to get an idea how to map this pattern, which is similar to APM (albeit simpler), to the currently en-vogue TAP (async/await) pattern.
See Also