File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/WebJobs.Script/Binding Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -148,28 +148,24 @@ public override Collection<Attribute> GetAttributes()
148
148
}
149
149
150
150
string connectionString = Context . GetMetadataValue < string > ( "connection" ) ;
151
- if ( ! string . IsNullOrEmpty ( connectionString ) )
152
- {
153
- connectionString = _nameResolver . Resolve ( connectionString ) ;
154
- }
155
151
156
152
if ( Context . IsTrigger )
157
153
{
158
154
var attribute = new EventHubTriggerAttribute ( eventHubName ) ;
155
+ attribute . Connection = connectionString ;
159
156
string consumerGroup = Context . GetMetadataValue < string > ( "consumerGroup" ) ;
160
157
if ( consumerGroup != null )
161
158
{
162
159
consumerGroup = _nameResolver . ResolveWholeString ( consumerGroup ) ;
163
160
attribute . ConsumerGroup = consumerGroup ;
164
161
}
165
162
attributes . Add ( attribute ) ;
166
- _eventHubConfiguration . AddReceiver ( eventHubName , connectionString ) ;
167
163
}
168
164
else
169
165
{
170
- attributes . Add ( new EventHubAttribute ( eventHubName ) ) ;
171
-
172
- _eventHubConfiguration . AddSender ( eventHubName , connectionString ) ;
166
+ var attribute = new EventHubAttribute ( eventHubName ) ;
167
+ attribute . Connection = connectionString ;
168
+ attributes . Add ( attribute ) ;
173
169
}
174
170
175
171
return attributes ;
You can’t perform that action at this time.
0 commit comments