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()
148148 }
149149
150150 string connectionString = Context . GetMetadataValue < string > ( "connection" ) ;
151- if ( ! string . IsNullOrEmpty ( connectionString ) )
152- {
153- connectionString = _nameResolver . Resolve ( connectionString ) ;
154- }
155151
156152 if ( Context . IsTrigger )
157153 {
158154 var attribute = new EventHubTriggerAttribute ( eventHubName ) ;
155+ attribute . Connection = connectionString ;
159156 string consumerGroup = Context . GetMetadataValue < string > ( "consumerGroup" ) ;
160157 if ( consumerGroup != null )
161158 {
162159 consumerGroup = _nameResolver . ResolveWholeString ( consumerGroup ) ;
163160 attribute . ConsumerGroup = consumerGroup ;
164161 }
165162 attributes . Add ( attribute ) ;
166- _eventHubConfiguration . AddReceiver ( eventHubName , connectionString ) ;
167163 }
168164 else
169165 {
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 ) ;
173169 }
174170
175171 return attributes ;
You can’t perform that action at this time.
0 commit comments