Show / Hide Table of Contents

Interface IMetadataContext

Functionality for working with metadata.

Namespace: Microsoft.XboxStudios.SQTech.Roster.Client
Assembly: Microsoft.XboxStudios.SQTech.Roster.Client.Common.dll
Syntax
public interface IMetadataContext

Methods

View Source

CreateItemAsync(IMetadataItem, CancellationToken)

Creates an new metadata item.

Declaration
Task CreateItemAsync(IMetadataItem item, CancellationToken cancellationToken = null)
Parameters
Type Name Description
IMetadataItem item

The item to create in Roster.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task

A task representing the work to create an item.

View Source

DeleteItemAsync(IMetadataItem, Boolean, CancellationToken)

Deletes a metadata item.

Declaration
Task DeleteItemAsync(IMetadataItem item, bool ignoreNotFoundException = false, CancellationToken cancellationToken = null)
Parameters
Type Name Description
IMetadataItem item

The metadata item to delete.

System.Boolean ignoreNotFoundException

True to ignore throwing RosterMetadataItemNotFoundException. Otherwise false.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task

A task representing the work to delete a metadata item.

View Source

GetItemByNameAsync<TOut>(String, String, CancellationToken)

Gets a metadata item by name.

Declaration
Task<TOut> GetItemByNameAsync<TOut>(string name, string containerName, CancellationToken cancellationToken = null)
    where TOut : IMetadataItem, new()
Parameters
Type Name Description
System.String name

The name of the metadata item.

System.String containerName

The item container to query.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task<TOut>

A enumeration of objects.

Type Parameters
Name Description
TOut

The type in which to deserialize the response.

View Source

GetItemsByContainerAsync<TOut>(String, CancellationToken)

Gets metadata items by container.

Declaration
Task<IEnumerable<TOut>> GetItemsByContainerAsync<TOut>(string containerName, CancellationToken cancellationToken = null)
    where TOut : IMetadataItem, new()
Parameters
Type Name Description
System.String containerName

The item container to query.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task<IEnumerable<TOut>>

A enumeration of metadata items.

Type Parameters
Name Description
TOut

The type in which to deserialize the response.

View Source

GetItemsByOwnerAsync<TOut>(String, CancellationToken)

Gets metadata items by owner.

Declaration
Task<IEnumerable<TOut>> GetItemsByOwnerAsync<TOut>(string containerName, CancellationToken cancellationToken = null)
    where TOut : IMetadataItem, new()
Parameters
Type Name Description
System.String containerName

The item container to query.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task<IEnumerable<TOut>>

A enumeration of metadata items.

Type Parameters
Name Description
TOut

The type in which to deserialize the response.

View Source

UpdateItemAsync(IMetadataItem, CancellationToken)

Updates an item.

Declaration
Task UpdateItemAsync(IMetadataItem item, CancellationToken cancellationToken = null)
Parameters
Type Name Description
IMetadataItem item

The item to set. This value must inherit from IMetadataItem.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task

A task representing the work to update the item.

View Source

UpdateOrCreateItemAsync(IMetadataItem, CancellationToken)

Updates the provided item if it exists. Otherwise it is created.

Declaration
Task UpdateOrCreateItemAsync(IMetadataItem item, CancellationToken cancellationToken = null)
Parameters
Type Name Description
IMetadataItem item

The item to create or update in Roster.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task

A task representing the work to create or update an item.

  • View Source
In This Article
Back to top Generated by DocFX