public ObjectToITableEntityConverter() { // JObject case should have been claimed by another converter. // So we can statically enforce an ITableEntity compatible contract var t = typeof(TElement); TableClient.VerifyContainsProperty(t, "RowKey"); TableClient.VerifyContainsProperty(t, "PartitionKey"); }
public ITableArgumentBinding TryCreate(Type parameterType) { if (!parameterType.IsGenericType || (parameterType.GetGenericTypeDefinition() != typeof(IAsyncCollector <>))) { return(null); } Type entityType = GetCollectorItemType(parameterType); if (!TableClient.ImplementsOrEqualsITableEntity(entityType)) { TableClient.VerifyContainsProperty(entityType, "RowKey"); TableClient.VerifyContainsProperty(entityType, "PartitionKey"); } return(CreateBinding(entityType)); }