public TableClientValueProvider( ParameterInfo parameter, TableConfigContext configContext) { Parameter = parameter; ConfigContext = configContext; }
public static string GetEntityId( this ApiHubTableAttribute attribute, TableConfigContext configContext) { var entityId = configContext.NameResolver.ResolveWholeString(attribute.EntityId); return(entityId); }
public TableClientBinding( ParameterInfo parameter, TableConfigContext configContext) { ValidateParameter(parameter); Parameter = parameter; ConfigContext = configContext; }
public TableEntityValueBinder( ParameterInfo parameter, ApiHubTableAttribute resolvedAttribute, TableConfigContext configContext) { Parameter = parameter; ResolvedAttribute = resolvedAttribute; ConfigContext = configContext; }
public static ITableClient GetTableClient( this ApiHubTableAttribute attribute, TableConfigContext configContext) { var connection = configContext.ConnectionFactory.CreateConnection(attribute.Connection); var tableClient = connection.CreateTableClient(); return(tableClient); }
public static ITable <TEntity> GetTableReference <TEntity>( this ApiHubTableAttribute attribute, TableConfigContext configContext) where TEntity : class { var dataSet = GetDataSetReference(attribute, configContext); var tableName = configContext.NameResolver.ResolveWholeString(attribute.TableName); var table = dataSet.GetTableReference <TEntity>(tableName); return(table); }
public static IDataSet GetDataSetReference( this ApiHubTableAttribute attribute, TableConfigContext configContext) { var tableClient = GetTableClient(attribute, configContext); var dataSetName = string.IsNullOrEmpty(attribute.DataSetName) ? null : configContext.NameResolver.ResolveWholeString(attribute.DataSetName); var dataSet = tableClient.GetDataSetReference(dataSetName); return(dataSet); }
public TableBinding( ParameterInfo parameter, TableConfigContext configContext) { ValidateParameter(parameter); Parameter = parameter; ConfigContext = configContext; ApiHubTableAttribute attribute = Parameter.GetTableAttribute(); if (!string.IsNullOrEmpty(attribute.DataSetName)) { _dataSetNameBindingTemplate = BindingTemplate.FromString(attribute.DataSetName, ignoreCase: true); } if (!string.IsNullOrEmpty(attribute.TableName)) { _tableNameBindingTemplate = BindingTemplate.FromString(attribute.TableName, ignoreCase: true); } }
public TableBindingProvider(TableConfigContext configContext) { ConfigContext = configContext; }