Пример #1
0
 /// <summary>
 /// Creates a Feed Reader for DocumentCollections in the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="collectionsLink">The link for collections</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{DocumentCollection}"/> instance.</returns>
 public static ResourceFeedReader <CosmosContainerSettings> CreateDocumentCollectionFeedReader(this DocumentClient client, string collectionsLink,
                                                                                               FeedOptions options = null)
 {
     return(new ResourceFeedReader <CosmosContainerSettings>(client, ResourceType.Collection, options, collectionsLink));
 }
Пример #2
0
 /// <summary>
 /// Creates a Feed Reader for User Defined Types from the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="userDefinedTypesLink">The link for user defined types</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{UserDefinedType}"/> instance.</returns>
 public static ResourceFeedReader <UserDefinedType> CreateUserDefinedTypeFeedReader(this DocumentClient client, string userDefinedTypesLink,
                                                                                    FeedOptions options = null)
 {
     return(new ResourceFeedReader <UserDefinedType>(client, ResourceType.UserDefinedType, options, userDefinedTypesLink));
 }
Пример #3
0
 /// <summary>
 /// Creates a Feed Reader for Documents in the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="documentsFeedOrDatabaseLink">The link for documents or self-link for database in case a partition resolver is used with the client</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <param name="partitionKey">The key used to determine the target collection</param>
 /// <returns>A <see cref="ResourceFeedReader{Document}"/> instance.</returns>
 public static ResourceFeedReader <Document> CreateDocumentFeedReader(this DocumentClient client, string documentsFeedOrDatabaseLink,
                                                                      FeedOptions options = null, object partitionKey = null)
 {
     return(new ResourceFeedReader <Document>(client, ResourceType.Document, options, documentsFeedOrDatabaseLink, partitionKey));
 }
Пример #4
0
 /// <summary>
 /// Creates a Feed Reader for PartitionKeyRanges in the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="partitionKeyRangesLink">The link for partition key ranges</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{PartitionKeyRange}"/> instance.</returns>
 public static ResourceFeedReader <PartitionKeyRange> CreatePartitionKeyRangeFeedReader(this DocumentClient client, string partitionKeyRangesLink,
                                                                                        FeedOptions options = null)
 {
     return(new ResourceFeedReader <PartitionKeyRange>(client, ResourceType.PartitionKeyRange, options, partitionKeyRangesLink));
 }
Пример #5
0
 /// <summary>
 /// Creates a Feed Reader for Offers in the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{Offer}"/> instance.</returns>
 /// <remarks>
 /// </remarks>
 public static ResourceFeedReader <Offer> CreateOfferFeedReader(this DocumentClient client, FeedOptions options = null)
 {
     return(new ResourceFeedReader <Offer>(client, ResourceType.Offer, options, null));
 }
Пример #6
0
 /// <summary>
 /// Creates a Feed Reader for databases in the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{Database}"/> instance.</returns>
 /// <remarks>
 /// </remarks>
 public static ResourceFeedReader <CosmosDatabaseSettings> CreateDatabaseFeedReader(this DocumentClient client, FeedOptions options = null)
 {
     return(new ResourceFeedReader <CosmosDatabaseSettings>(client, ResourceType.Database, options, null));
 }
Пример #7
0
 /// <summary>
 /// Creates a Feed Reader for Conflicts from the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="conflictsLink">The link for conflicts</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{Conflict}"/> instance.</returns>
 public static ResourceFeedReader <Conflict> CreateConflictFeedReader(this DocumentClient client, string conflictsLink,
                                                                      FeedOptions options = null)
 {
     return(new ResourceFeedReader <Conflict>(client, ResourceType.Conflict, options, conflictsLink));
 }
Пример #8
0
 /// <summary>
 /// Creates a Feed Reader for Schemas from the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="schemasLink">The link for schemas</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{Schema}"/> instance.</returns>
 internal static ResourceFeedReader <Schema> CreateSchemaFeedReader(this DocumentClient client, string schemasLink,
                                                                    FeedOptions options = null)
 {
     return(new ResourceFeedReader <Schema>(client, ResourceType.Schema, options, schemasLink));
 }
Пример #9
0
 /// <summary>
 /// Creates a Feed Reader for Attachments from the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="attachmentsLink">The link for attachments</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{Database}"/> instance.</returns>
 public static ResourceFeedReader <Attachment> CreateAttachmentFeedReader(this DocumentClient client, string attachmentsLink,
                                                                          FeedOptions options = null)
 {
     return(new ResourceFeedReader <Attachment>(client, ResourceType.Attachment, options, attachmentsLink));
 }
Пример #10
0
 /// <summary>
 /// Creates a Feed Reader for UserDefinedFunctions from the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="userDefinedFunctionsLink">The link for userDefinedFunctions</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{UserDefinedFunctions}"/> instance.</returns>
 public static ResourceFeedReader <CosmosUserDefinedFunctionSettings> CreateUserDefinedFunctionFeedReader(this DocumentClient client, string userDefinedFunctionsLink,
                                                                                                          FeedOptions options = null)
 {
     return(new ResourceFeedReader <CosmosUserDefinedFunctionSettings>(client, ResourceType.UserDefinedFunction, options, userDefinedFunctionsLink));
 }
Пример #11
0
 /// <summary>
 /// Creates a Feed Reader for Triggers from the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="triggersLink">The link for triggers</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{Trigger}"/> instance.</returns>
 public static ResourceFeedReader <CosmosTriggerSettings> CreateTriggerFeedReader(this DocumentClient client, string triggersLink,
                                                                                  FeedOptions options = null)
 {
     return(new ResourceFeedReader <CosmosTriggerSettings>(client, ResourceType.Trigger, options, triggersLink));
 }
Пример #12
0
 /// <summary>
 /// Creates a Feed Reader for StoredProcedures from the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="storedProceduresLink">The link for stored procedures</param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{StoredProcedure}"/> instance.</returns>
 public static ResourceFeedReader <CosmosStoredProcedureSettings> CreateStoredProcedureFeedReader(this DocumentClient client, string storedProceduresLink,
                                                                                                  FeedOptions options = null)
 {
     return(new ResourceFeedReader <CosmosStoredProcedureSettings>(client, ResourceType.StoredProcedure, options, storedProceduresLink));
 }
Пример #13
0
 /// <summary>
 /// Creates a Feed Reader for Permissions from the Azure Cosmos DB service.
 /// </summary>
 /// <param name="client">The <see cref="DocumentClient"/> instance.</param>
 /// <param name="permissionsLink"></param>
 /// <param name="options">the <see cref="FeedOptions"/> options for the request.</param>
 /// <returns>A <see cref="ResourceFeedReader{Permission}"/> instance.</returns>
 public static ResourceFeedReader <Permission> CreatePermissionFeedReader(this DocumentClient client, string permissionsLink,
                                                                          FeedOptions options = null)
 {
     return(new ResourceFeedReader <Permission>(client, ResourceType.Permission, options, permissionsLink));
 }