Skip to content

Commit b95e7af

Browse files
authored
Update samples and extensions
1 parent a51456c commit b95e7af

File tree

21 files changed

+92
-71
lines changed

21 files changed

+92
-71
lines changed

extensions/Worker.Extensions.Abstractions/OutputBindingAttribute.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,5 @@ public abstract class OutputBindingAttribute : BindingAttribute
1111
public OutputBindingAttribute()
1212
{
1313
}
14-
15-
public OutputBindingAttribute(string name)
16-
{
17-
Name = name;
18-
}
19-
20-
public string? Name { get; }
2114
}
2215
}

extensions/Worker.Extensions.CosmosDB/CosmosDBOutputAttribute.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@ public CosmosDBOutputAttribute(string databaseName, string collectionName)
1818
CollectionName = collectionName;
1919
}
2020

21-
/// <summary>
22-
/// Constructs a new instance.
23-
/// </summary>
24-
/// <param name="databaseName">The CosmosDB database name.</param>
25-
/// <param name="collectionName">The CosmosDB collection name.</param>
26-
public CosmosDBOutputAttribute(string name, string databaseName, string collectionName) : base(name)
27-
{
28-
DatabaseName = databaseName;
29-
CollectionName = collectionName;
30-
}
31-
3221
/// <summary>
3322
/// The name of the database to which the parameter applies.
3423
/// May include binding parameters.

extensions/Worker.Extensions.EventGrid/EventGridOutputAttribute.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ public sealed class EventGridOutputAttribute : OutputBindingAttribute
1010
/// <summary>
1111
/// Initialize a new instance of the <see cref="EventGridOutputAttribute"/>
1212
/// </summary>
13-
/// <param name="name">The name of the output binding property to bind.</param>
14-
public EventGridOutputAttribute(string name) : base(name)
13+
public EventGridOutputAttribute()
1514
{
1615
}
1716

extensions/Worker.Extensions.EventHubs/EventHubOutputAttribute.cs

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

44
using Microsoft.Azure.Functions.Worker.Extensions.Abstractions;
@@ -10,9 +10,8 @@ public sealed class EventHubOutputAttribute : OutputBindingAttribute
1010
/// <summary>
1111
/// Initialize a new instance of the <see cref="EventHubOutputAttribute"/>
1212
/// </summary>
13-
/// <param name="name">The name of the output binding property to bind.</param>
1413
/// <param name="eventHubName">Name of the event hub </param>
15-
public EventHubOutputAttribute(string name, string eventHubName) : base(name)
14+
public EventHubOutputAttribute(string eventHubName)
1615
{
1716
EventHubName = eventHubName;
1817
}

extensions/Worker.Extensions.Kafka/KafkaOutputAttribute.cs

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

44
using Microsoft.Azure.Functions.Worker.Extensions.Abstractions;
@@ -10,10 +10,9 @@ public sealed class KafkaOutputAttribute : OutputBindingAttribute
1010
/// <summary>
1111
/// Initialize a new instance of the <see cref="KafkaOutputAttribute"/>
1212
/// </summary>
13-
/// <param name="name">The name of the output binding property to bind.</param>
1413
/// <param name="brokerList">Broker list</param>
1514
/// <param name="topic">Topic name</param>
16-
public KafkaOutputAttribute(string name, string brokerList, string topic) : base(name)
15+
public KafkaOutputAttribute(string brokerList, string topic)
1716
{
1817
BrokerList = brokerList;
1918
Topic = topic;

extensions/Worker.Extensions.RabbitMQ/RabbitMQOutputAttribute.cs

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

44
using Microsoft.Azure.Functions.Worker.Extensions.Abstractions;
@@ -10,8 +10,7 @@ public sealed class RabbitMQOutputAttribute : OutputBindingAttribute
1010
/// <summary>
1111
/// Initializes a new instance of the <see cref="RabbitMQOutputAttribute"/> class.
1212
/// </summary>
13-
/// <param name="name">The name of the output binding property to bind.</param>
14-
public RabbitMQOutputAttribute(string name) : base(name)
13+
public RabbitMQOutputAttribute()
1514
{
1615
}
1716

extensions/Worker.Extensions.ServiceBus/ServiceBusOutputAttribute.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ public sealed class ServiceBusOutputAttribute : OutputBindingAttribute
1010
/// <summary>
1111
/// Initializes a new instance of the <see cref="ServiceBusOutputAttribute"/> class.
1212
/// </summary>
13-
/// <param name="name">The name of the output binding property to bind.</param>
1413
/// <param name="queueOrTopicName">The name of the queue or topic to bind to.</param>
15-
public ServiceBusOutputAttribute(string name, string queueOrTopicName) : base(name)
14+
public ServiceBusOutputAttribute(string queueOrTopicName)
1615
{
1716
QueueOrTopicName = queueOrTopicName;
1817
EntityType = EntityType.Queue;
@@ -23,7 +22,7 @@ public ServiceBusOutputAttribute(string name, string queueOrTopicName) : base(na
2322
/// </summary>
2423
/// <param name="queueOrTopicName">The name of the queue or topic to bind to.</param>
2524
/// <param name="queueOrTopicName">The type of the entity to bind to.</param>
26-
public ServiceBusOutputAttribute(string name, string queueOrTopicName, EntityType entityType) : base(name)
25+
public ServiceBusOutputAttribute(string queueOrTopicName, EntityType entityType)
2726
{
2827
QueueOrTopicName = queueOrTopicName;
2928
EntityType = entityType;

extensions/Worker.Extensions.SignalRService/SignalROutputAttribute.cs

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

44
using Microsoft.Azure.Functions.Worker.Extensions.Abstractions;
@@ -7,7 +7,7 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.SignalRService
77
{
88
public sealed class SignalROutputAttribute : OutputBindingAttribute
99
{
10-
public SignalROutputAttribute(string name) : base(name)
10+
public SignalROutputAttribute()
1111
{
1212
}
1313

extensions/Worker.Extensions.Storage/Tables/TableOutputAttribute.cs

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

44
using Microsoft.Azure.Functions.Worker.Extensions.Abstractions;
@@ -12,29 +12,26 @@ public sealed class TableOutputAttribute : OutputBindingAttribute
1212
private readonly string? _rowKey;
1313

1414
/// <summary>Initializes a new instance of the <see cref="TableOutputAttribute"/> class.</summary>
15-
/// <param name="name">The name of the output binding property to bind.</param>
1615
/// <param name="tableName">The name of the table to which to bind.</param>
17-
public TableOutputAttribute(string name, string tableName) : base(name)
16+
public TableOutputAttribute(string tableName)
1817
{
1918
_tableName = tableName;
2019
}
2120

2221
/// <summary>Initializes a new instance of the <see cref="TableOutputAttribute"/> class.</summary>
23-
/// <param name="name">The name of the output binding property to bind.</param>
2422
/// <param name="tableName">The name of the table containing the entity.</param>
2523
/// <param name="partitionKey">The partition key of the entity.</param>
26-
public TableOutputAttribute(string name, string tableName, string partitionKey) : base(name)
24+
public TableOutputAttribute(string tableName, string partitionKey)
2725
{
2826
_tableName = tableName;
2927
_partitionKey = partitionKey;
3028
}
3129

3230
/// <summary>Initializes a new instance of the <see cref="TableAttribute"/> class.</summary>
33-
/// <param name="name">The name of the output binding property to bind.</param>
3431
/// <param name="tableName">The name of the table containing the entity.</param>
3532
/// <param name="partitionKey">The partition key of the entity.</param>
3633
/// <param name="rowKey">The row key of the entity.</param>
37-
public TableOutputAttribute(string name, string tableName, string partitionKey, string rowKey) : base(name)
34+
public TableOutputAttribute(string tableName, string partitionKey, string rowKey)
3835
{
3936
_tableName = tableName;
4037
_partitionKey = partitionKey;

samples/SampleApp/Blob/BlobFunction.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ namespace SampleApp
1111
public static class BlobFunction
1212
{
1313
[Function("BlobFunction")]
14-
[BlobOutput("test-samples-output/{name}-output.txt", Connection = "AzureWebJobsStorage")]
14+
[BlobOutput("test-samples-output/{name}-output.txt")]
1515
public static string Run(
16-
[BlobTrigger("test-samples-trigger/{name}", Connection = "AzureWebJobsStorage")] string myTriggerItem,
17-
[BlobInput("test-samples-input/sample1.txt", Connection = "AzureWebJobsStorage")] string myBlob,
16+
[BlobTrigger("test-samples-trigger/{name}")] string myTriggerItem,
17+
[BlobInput("test-samples-input/sample1.txt")] string myBlob,
1818
FunctionContext context)
1919
{
2020
var logger = context.GetLogger("BlobFunction");

0 commit comments

Comments
 (0)