WLT documentation has moved.

We are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the Core WLT section of the dot net API explorer and related pages. Existing content will remain here but will not be updated further.

Search Results for

    Show / Hide Table of Contents

    Delegate ResourceMirror.CreateResource<ItemType, ResourceType>

    Callback for creating a new instance of a resource matching a specific item. This will be called for each item in Sync's currentItems list which doesn't have a matching resource in Sync's resources list.

    Namespace: Microsoft.MixedReality.WorldLocking.Core
    Assembly: cs.temp.dll.dll
    Syntax
    public delegate bool CreateResource<ItemType, ResourceType>(ItemType item, out ResourceType resource);
    Parameters
    Type Name Description
    ItemType item

    The source item to create a new resource for.

    ResourceType resource

    out param for created resource.

    Returns
    Type Description
    Boolean

    Returns true if a resource was created successfully.

    Type Parameters
    Name Description
    ItemType

    Type of the source data.

    ResourceType

    Type of the resources to be managed.

    Remarks

    Note that it is not an error to return false, it only means that for any reason the resource was not created. However, if the resource is not created, then in the next call to Sync, it will be noted that the item doesn't have a matching resource and the create call will be made again. To prevent fruitless and possibly expensive create calls, the offending item should be removed from the items list passed into Sync. As noted below, all additions and removals from the items list must happen outside the Sync call.

    In This Article
    Back to top Generated by DocFX