コード例 #1
0
        /// <summary>
        /// list azure table clients by query
        /// </summary>
        /// <param name="localChannel"></param>
        /// <param name="query">table query string</param>
        /// <returns></returns>
        internal IEnumerable <AzureStorageTable> ListTablesByQueryV2(IStorageTableManagement localChannel, string query)
        {
            IEnumerable <TableItem> tableItems = localChannel.QueryTables(query, this.CmdletCancellationToken);

            foreach (TableItem tableItem in tableItems)
            {
                yield return(localChannel.GetAzureStorageTable(tableItem.Name));
            }
        }
コード例 #2
0
        /// <summary>
        /// create an azure table
        /// </summary>
        /// <param name="localChannel"></param>
        /// <param name="tableName"></param>
        internal AzureStorageTable CreateAzureTableV2(IStorageTableManagement localChannel, string tableName)
        {
            if (!NameUtil.IsValidTableName(tableName))
            {
                throw new ArgumentException(String.Format(Resources.InvalidTableName, tableName));
            }

            if (!localChannel.CreateTableIfNotExists(tableName, this.CmdletCancellationToken))
            {
                throw new ResourceAlreadyExistException(String.Format(Resources.TableAlreadyExists, tableName));
            }

            return(localChannel.GetAzureStorageTable(tableName));
        }