public static AMQPConfig GetAMQPConfig( ) { AMQPServiceConfigSection section = ConfigurationManager.GetSection("AMQPServiceConfig") as AMQPServiceConfigSection; AMQPConfig configData = null; if (section != null) { configData = new AMQPConfig { AMQPSAddress = section.AMQPSAddress, EventHubName = section.EventHubName, EventHubMessageSubject = section.EventHubMessageSubject, EventHubDeviceId = section.EventHubDeviceId, EventHubDeviceDisplayName = section.EventHubDeviceDisplayName }; } return(configData); }
public static AMQPConfig GetAMQPConfig( ) { AMQPServiceConfigSection section = ConfigurationManager.GetSection( "AMQPServiceConfig" ) as AMQPServiceConfigSection; AMQPConfig configData = null; if( section != null ) { configData = new AMQPConfig { AMQPSAddress = section.AMQPSAddress, EventHubName = section.EventHubName, EventHubMessageSubject = section.EventHubMessageSubject, EventHubDeviceId = section.EventHubDeviceId, EventHubDeviceDisplayName = section.EventHubDeviceDisplayName }; } return configData; }