public static ICosmosDbContainer AddTag(this ICosmosDbContainer container, string context)
        {
            TrackedCosmosDbContainer trackedContainer = container as TrackedCosmosDbContainer;

            if (trackedContainer != null)
            {
                trackedContainer.Tags.Add(context);
                return(trackedContainer);
            }
            return(container);
        }
Пример #2
0
        public static async Task <ICosmosDbContainer> GetContainerForFeature(this ICosmosDbClient client, string containerId, string featureToTrack)
        {
            ICosmosDbContainer container = await client.GetContainer(containerId);

            TrackedCosmosDbContainer trackedContainer = container as TrackedCosmosDbContainer;

            if (trackedContainer != null)
            {
                trackedContainer.Feature = featureToTrack;
                return(trackedContainer);
            }
            return(container);
        }