Skip to content

Commit 32edecc

Browse files
authored
More mechanical cleanup of tables extension (Azure#25815)
1 parent 67090e5 commit 32edecc

File tree

133 files changed

+914
-876
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+914
-876
lines changed

sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/api/Microsoft.Azure.WebJobs.Extensions.Table.netstandard2.0.cs renamed to sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/api/Microsoft.Azure.WebJobs.Extensions.Tables.netstandard2.0.cs

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
namespace Microsoft.Azure.WebJobs
22
{
3-
public partial class StorageAccount
4-
{
5-
public StorageAccount() { }
6-
public StorageAccount(Microsoft.Azure.WebJobs.Extensions.Storage.IDelegatingHandlerProvider delegatingHandlerProvider) { }
7-
public virtual string Name { get { throw null; } }
8-
public Microsoft.Azure.Storage.CloudStorageAccount SdkObject { get { throw null; } protected set { } }
9-
public Microsoft.Azure.Cosmos.Table.CloudStorageAccount TableSdkObject { get { throw null; } protected set { } }
10-
public virtual Microsoft.Azure.Cosmos.Table.CloudTableClient CreateCloudTableClient() { throw null; }
11-
public virtual bool IsDevelopmentStorageAccount() { throw null; }
12-
public static Microsoft.Azure.WebJobs.StorageAccount New(Microsoft.Azure.Storage.CloudStorageAccount account, Microsoft.Azure.Cosmos.Table.CloudStorageAccount tableAccount = null, Microsoft.Azure.WebJobs.Extensions.Storage.IDelegatingHandlerProvider delegatingHandlerProvider = null) { throw null; }
13-
public static Microsoft.Azure.WebJobs.StorageAccount NewFromConnectionString(string accountConnectionString) { throw null; }
14-
}
15-
public partial class StorageAccountProvider
16-
{
17-
public StorageAccountProvider(Microsoft.Extensions.Configuration.IConfiguration configuration) { }
18-
public StorageAccountProvider(Microsoft.Extensions.Configuration.IConfiguration configuration, Microsoft.Azure.WebJobs.Extensions.Storage.IDelegatingHandlerProvider delegatingHandlerProvider) { }
19-
public virtual Microsoft.Azure.WebJobs.StorageAccount Get(string name) { throw null; }
20-
public Microsoft.Azure.WebJobs.StorageAccount Get(string name, Microsoft.Azure.WebJobs.INameResolver resolver) { throw null; }
21-
public virtual Microsoft.Azure.WebJobs.StorageAccount GetHost() { throw null; }
22-
}
233
[Microsoft.Azure.WebJobs.ConnectionProviderAttribute(typeof(Microsoft.Azure.WebJobs.StorageAccountAttribute))]
244
[Microsoft.Azure.WebJobs.Description.BindingAttribute]
255
[System.AttributeUsageAttribute(System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue)]
@@ -30,7 +10,7 @@ public TableAttribute(string tableName) { }
3010
public TableAttribute(string tableName, string partitionKey) { }
3111
public TableAttribute(string tableName, string partitionKey, string rowKey) { }
3212
public string Connection { get { throw null; } set { } }
33-
[Microsoft.Azure.WebJobs.Description.AutoResolveAttribute(ResolutionPolicyType=typeof(Microsoft.Azure.WebJobs.Host.Bindings.ODataFilterResolutionPolicy))]
13+
[Microsoft.Azure.WebJobs.Description.AutoResolveAttribute(ResolutionPolicyType=typeof(Microsoft.Azure.WebJobs.Extensions.Tables.ODataFilterResolutionPolicy))]
3414
public string Filter { get { throw null; } set { } }
3515
[Microsoft.Azure.WebJobs.Description.AutoResolveAttribute]
3616
public string PartitionKey { get { throw null; } }
@@ -42,18 +22,6 @@ public TableAttribute(string tableName, string partitionKey, string rowKey) { }
4222
public int Take { get { throw null; } set { } }
4323
}
4424
}
45-
namespace Microsoft.Azure.WebJobs.Extensions.Storage
46-
{
47-
public partial class AzureStorageWebJobsStartup : Microsoft.Azure.WebJobs.Hosting.IWebJobsStartup
48-
{
49-
public AzureStorageWebJobsStartup() { }
50-
public void Configure(Microsoft.Azure.WebJobs.IWebJobsBuilder builder) { }
51-
}
52-
public partial interface IDelegatingHandlerProvider
53-
{
54-
System.Net.Http.DelegatingHandler Create();
55-
}
56-
}
5725
namespace Microsoft.Azure.WebJobs.Host.Protocols
5826
{
5927
public partial class TableEntityParameterDescriptor : Microsoft.Azure.WebJobs.Host.Protocols.ParameterDescriptor
@@ -75,8 +43,8 @@ public TableParameterDescriptor() { }
7543
}
7644
namespace Microsoft.Extensions.Hosting
7745
{
78-
public static partial class StorageWebJobsBuilderExtensions
46+
public static partial class TablesWebJobsBuilderExtensions
7947
{
80-
public static Microsoft.Azure.WebJobs.IWebJobsBuilder AddAzureStorage(this Microsoft.Azure.WebJobs.IWebJobsBuilder builder) { throw null; }
48+
public static Microsoft.Azure.WebJobs.IWebJobsBuilder AddAzureTables(this Microsoft.Azure.WebJobs.IWebJobsBuilder builder) { throw null; }
8149
}
8250
}

sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/AzureStorageWebJobsStartup.cs renamed to sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/AzureTablesWebJobsStartup.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the MIT License. See License.txt in the project root for license information.
33

4-
using Microsoft.Azure.WebJobs.Extensions.Storage;
4+
using Microsoft.Azure.WebJobs.Extensions.Tables;
55
using Microsoft.Azure.WebJobs.Hosting;
66
using Microsoft.Extensions.Hosting;
77

8-
[assembly: WebJobsStartup(typeof(AzureStorageWebJobsStartup))]
8+
[assembly: WebJobsStartup(typeof(AzureTablesWebJobsStartup))]
99

10-
namespace Microsoft.Azure.WebJobs.Extensions.Storage
10+
namespace Microsoft.Azure.WebJobs.Extensions.Tables
1111
{
12-
public class AzureStorageWebJobsStartup : IWebJobsStartup
12+
internal class AzureTablesWebJobsStartup : IWebJobsStartup
1313
{
1414
public void Configure(IWebJobsBuilder builder)
1515
{
16-
builder.AddAzureStorage();
16+
builder.AddAzureTables();
1717
}
1818
}
1919
}

sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/BindableTableEntityPath.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the MIT License. See License.txt in the project root for license information.
3-
using System.Collections.Generic;
4-
using System.Linq;
5-
using Microsoft.Azure.WebJobs.Host.Bindings;
3+
64
using Microsoft.Azure.WebJobs.Host.Bindings.Path;
7-
namespace Microsoft.Azure.WebJobs.Host.Tables
5+
6+
namespace Microsoft.Azure.WebJobs.Extensions.Tables
87
{
98
internal static class BindableTableEntityPath
109
{
@@ -20,11 +19,12 @@ public static IBindableTableEntityPath Create(string tableNamePattern, string pa
2019
{
2120
return new ParameterizedTableEntityPath(tableNameTemplate, partitionKeyTemplate, rowKeyTemplate);
2221
}
22+
2323
TableClient.ValidateAzureTableName(tableNamePattern);
2424
TableClient.ValidateAzureTableKeyValue(partitionKeyPattern);
2525
TableClient.ValidateAzureTableKeyValue(rowKeyPattern);
2626
TableEntityPath innerPath = new TableEntityPath(tableNamePattern, partitionKeyPattern, rowKeyPattern);
2727
return new BoundTableEntityPath(innerPath);
2828
}
2929
}
30-
}
30+
}

sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/BoundTableEntityPath.cs

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Collections.Generic;
55
using System.Linq;
66

7-
namespace Microsoft.Azure.WebJobs.Host.Tables
7+
namespace Microsoft.Azure.WebJobs.Extensions.Tables
88
{
99
internal class BoundTableEntityPath : IBindableTableEntityPath
1010
{
@@ -15,30 +15,15 @@ public BoundTableEntityPath(TableEntityPath innerPath)
1515
_innerPath = innerPath;
1616
}
1717

18-
public string TableNamePattern
19-
{
20-
get { return _innerPath.TableName; }
21-
}
18+
public string TableNamePattern => _innerPath.TableName;
2219

23-
public string PartitionKeyPattern
24-
{
25-
get { return _innerPath.PartitionKey; }
26-
}
20+
public string PartitionKeyPattern => _innerPath.PartitionKey;
2721

28-
public string RowKeyPattern
29-
{
30-
get { return _innerPath.RowKey; }
31-
}
22+
public string RowKeyPattern => _innerPath.RowKey;
3223

33-
public bool IsBound
34-
{
35-
get { return true; }
36-
}
24+
public bool IsBound => true;
3725

38-
public IEnumerable<string> ParameterNames
39-
{
40-
get { return Enumerable.Empty<string>(); }
41-
}
26+
public IEnumerable<string> ParameterNames => Enumerable.Empty<string>();
4227

4328
public TableEntityPath Bind(IReadOnlyDictionary<string, object> bindingData)
4429
{
@@ -50,4 +35,4 @@ public override string ToString()
5035
return _innerPath.ToString();
5136
}
5237
}
53-
}
38+
}

sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/CloudStorageAccount/CloudStorageAccountBinding.cs

Lines changed: 0 additions & 80 deletions
This file was deleted.

sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/CloudStorageAccount/CloudStorageAccountBindingProvider.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/CloudStorageAccount/CloudStorageAccountValueProvider.cs

Lines changed: 0 additions & 34 deletions
This file was deleted.

sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/CloudStorageAccount/OutputConverter.cs

Lines changed: 0 additions & 33 deletions
This file was deleted.

sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/CloudStorageAccount/StringToCloudStorageAccountConverter.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/CompositeEntityArgumentBindingProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Reflection;
66
using Microsoft.Azure.WebJobs.Host.Bindings;
77

8-
namespace Microsoft.Azure.WebJobs.Host.Tables
8+
namespace Microsoft.Azure.WebJobs.Extensions.Tables
99
{
1010
internal class CompositeEntityArgumentBindingProvider : ITableEntityArgumentBindingProvider
1111
{
@@ -31,4 +31,4 @@ public IArgumentBinding<TableEntityContext> TryCreate(ParameterInfo parameter)
3131
return null;
3232
}
3333
}
34-
}
34+
}

0 commit comments

Comments
 (0)