示例#1
0
        public async Task <ManagementActionAddResult> AddCollection(string host, string authorisationKey, string databaseId)
        {
            var createItemProperties = new CreateItemProperties("Collection");

            return(await DoAction(
                       "Add Collection",
                       PackIconKind.ViewList,
                       createItemProperties,
                       properties => DoAddCollection(properties, host, authorisationKey, databaseId),
                       (result, properties) => result?ManagementActionAddResult.Complete(properties.ItemId) : ManagementActionAddResult.Incomplete()));
        }
示例#2
0
        public async Task <ManagementActionAddResult> AddDatabase(string host, string authorisationKey)
        {
            var createItemProperties = new CreateItemProperties("Database");

            return(await DoAction(
                       "Add Database",
                       PackIconKind.Database,
                       createItemProperties,
                       properties => DoAddDatabase(properties, host, authorisationKey),
                       (result, properties) => result?ManagementActionAddResult.Complete(properties.ItemId) : ManagementActionAddResult.Incomplete()));
        }