C# Class Glipho.OAuth.Providers.Database.Mongo.Consumers

MongoDB implementation of the IConsumers database.
Inheritance: MongoDbClient, IConsumers
Afficher le fichier Open project: Glipho/oauth-providers

Méthodes publiques

Méthode Description
Consumers ( ) : System

Initialises a new instance of the Consumers class.

Consumers ( string connectionString ) : System

Initialises a new instance of the Consumers class.

Create ( Database newConsumer ) : Database.Consumer

Create a new consumer.

Get ( string id ) : Database.Consumer

Retrieve a consumer from the database.

List ( int offset, int limit ) : IList

List all consumers by name.

If there are no results with the given range, an empty list should be returned.

Private Methods

Méthode Description
EnsureIndexesExist ( ) : void

Ensure the relevant indexes exist.

InitialiseClass ( ) : void

Initialise the class.

Method Details

Consumers() public méthode

Initialises a new instance of the Consumers class.
public Consumers ( ) : System
Résultat System

Consumers() public méthode

Initialises a new instance of the Consumers class.
public Consumers ( string connectionString ) : System
connectionString string The connection string.
Résultat System

Create() public méthode

Create a new consumer.
Thrown if a parameter is not valid. Thrown if an error occurs while executing the requested command.
public Create ( Database newConsumer ) : Database.Consumer
newConsumer MongoDB.Driver.Database The to create.
Résultat Database.Consumer

Get() public méthode

Retrieve a consumer from the database.
Thrown if a parameter is not valid. Thrown if an error occurs while executing the requested command.
public Get ( string id ) : Database.Consumer
id string The identifier of the consumer to retrieve.
Résultat Database.Consumer

List() public méthode

List all consumers by name.

If there are no results with the given range, an empty list should be returned.

Thrown if a parameter is outside of a permitted range. Thrown if an error occurs while executing the requested command.
public List ( int offset, int limit ) : IList
offset int The amount to offset the results by. Minimum of 0.
limit int The maximum number of results to return. Maximum of 100.
Résultat IList