Show / Hide Table of Contents

Interface IDocumentService

Generic document data access interface.

Namespace: Microsoft.GNS.Roster.Service
Assembly: Microsoft.GNS.Roster.Service.dll
Syntax
public interface IDocumentService

Methods

View Source

CreateDocumentAsync(IRosterDocument)

Creates a document.

Declaration
Task<IRosterDocument> CreateDocumentAsync(IRosterDocument document)
Parameters
Type Name Description
IRosterDocument document

The document to save.

Returns
Type Description
Task<IRosterDocument>

An object representing the IRosterDocument.

View Source

DeleteDocumentAsync(IRosterDocument)

Deletes a container.

Declaration
Task DeleteDocumentAsync(IRosterDocument document)
Parameters
Type Name Description
IRosterDocument document

The document to delete.

Returns
Type Description
Task

A task representing the work to delete the document.

View Source

GetDocumentByIdAsync(Guid)

Gets a specific document by Id.

Declaration
Task<IRosterDocument> GetDocumentByIdAsync(Guid id)
Parameters
Type Name Description
Guid id

The Id of the document to get.

Returns
Type Description
Task<IRosterDocument>

An object that represents a document in Roster.

View Source

GetDocumentByNameAsync(String, String, Scope)

Gets a specific document by name and container.

Declaration
Task<IRosterDocument> GetDocumentByNameAsync(string name, string container, Scope scope)
Parameters
Type Name Description
System.String name

The name of the document to get.

System.String container

The container of the document.

Scope scope

The scope of the document container.

Returns
Type Description
Task<IRosterDocument>

An object that represent a document in Roster.

View Source

GetDocumentsByOwnerAsync(IRosterUser, String, Scope)

Gets all documents for a given owner and container.

Declaration
IAsyncEnumerable<IRosterDocument> GetDocumentsByOwnerAsync(IRosterUser owner, string container, Scope scope)
Parameters
Type Name Description
IRosterUser owner

The owner of the document.

System.String container

The container of the document.

Scope scope

The scope of the document container.

Returns
Type Description
IAsyncEnumerable<IRosterDocument>

An enumerable list of objects that implement IRosterDocument.

View Source

GetDocumentsFromContainerAsync(String, Scope)

Gets all documents for the given container.

Declaration
IAsyncEnumerable<IRosterDocument> GetDocumentsFromContainerAsync(string container, Scope scope)
Parameters
Type Name Description
System.String container

The container of the document.

Scope scope

The scope of the document container.

Returns
Type Description
IAsyncEnumerable<IRosterDocument>

An enumerable list of IRosterDocument objects.

View Source

UpdateDocumentAsync(IRosterDocument)

Updates a document.

Declaration
Task<IRosterDocument> UpdateDocumentAsync(IRosterDocument document)
Parameters
Type Name Description
IRosterDocument document

The document to save.

Returns
Type Description
Task<IRosterDocument>

An object representing the IRosterDocument.

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