public TableEntityPath Bind(IReadOnlyDictionary <string, object> bindingData) { string tableName = _tableNameTemplate.Bind(bindingData); string partitionKey = _partitionKeyTemplate.Bind(bindingData); string rowKey = _rowKeyTemplate.Bind(bindingData); TableClientHelpers.ValidateAzureTableName(tableName); TableClientHelpers.ValidateAzureTableKeyValue(partitionKey); TableClientHelpers.ValidateAzureTableKeyValue(rowKey); return(new TableEntityPath(tableName, partitionKey, rowKey)); }
public static IBindableTableEntityPath Create(string tableNamePattern, string partitionKeyPattern, string rowKeyPattern) { BindingTemplate tableNameTemplate = BindingTemplate.FromString(tableNamePattern); BindingTemplate partitionKeyTemplate = BindingTemplate.FromString(partitionKeyPattern); BindingTemplate rowKeyTemplate = BindingTemplate.FromString(rowKeyPattern); if (tableNameTemplate.HasParameters || partitionKeyTemplate.HasParameters || rowKeyTemplate.HasParameters) { return(new ParameterizedTableEntityPath(tableNameTemplate, partitionKeyTemplate, rowKeyTemplate)); } TableClientHelpers.ValidateAzureTableName(tableNamePattern); TableClientHelpers.ValidateAzureTableKeyValue(partitionKeyPattern); TableClientHelpers.ValidateAzureTableKeyValue(rowKeyPattern); TableEntityPath innerPath = new TableEntityPath(tableNamePattern, partitionKeyPattern, rowKeyPattern); return(new BoundTableEntityPath(innerPath)); }