コード例 #1
0
        public List <string> GetImportableItems(int packageId, int itemTypeId,
                                                Type itemType, ResourceGroupInfo group)
        {
            List <string> items = new List <string>();

            // get service id
            int serviceId = PackageController.GetPackageServiceId(packageId, group.GroupName);

            if (serviceId == 0)
            {
                return(items);
            }

            DatabaseServer db = GetDatabaseServer(serviceId);

            if (itemType == typeof(SqlDatabase))
            {
                items.AddRange(db.GetDatabases());
            }
            else if (itemType == typeof(SqlUser))
            {
                items.AddRange(db.GetUsers());
            }

            return(items);
        }