Interface IDocumentService
Generic document data access interface.
Namespace: Microsoft.GNS.Roster.Service
Assembly: Microsoft.GNS.Roster.Service.dll
Syntax
public interface IDocumentService
Methods
View SourceCreateDocumentAsync(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. |
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. |
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. |
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. |
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. |
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. |
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. |