File tree Expand file tree Collapse file tree 5 files changed +18
-18
lines changed Expand file tree Collapse file tree 5 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -50,15 +50,15 @@ public class Program
50
50
51
51
public static async Task Main ( string [ ] args )
52
52
{
53
- if ( args . Length != 5 )
53
+ if ( args . Length != 4 )
54
54
{
55
55
Console . WriteLine ( "Usage: .. brokerList topic group \" principal=<value> scope=<scope>\" " ) ;
56
56
return ;
57
57
}
58
- string bootstrapServers = args [ 1 ] ;
59
- string topicName = args [ 2 ] ;
60
- string groupId = args [ 3 ] ;
61
- string oauthConf = args [ 4 ] ;
58
+ string bootstrapServers = args [ 0 ] ;
59
+ string topicName = args [ 1 ] ;
60
+ string groupId = args [ 2 ] ;
61
+ string oauthConf = args [ 3 ] ;
62
62
63
63
if ( ! Regex . IsMatch ( oauthConf , OauthConfigRegexPattern ) )
64
64
{
Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ public class Program
39
39
private const String OAuthBearerScope = "<scope>" ;
40
40
public static async Task Main ( string [ ] args )
41
41
{
42
- if ( args . Length != 2 )
42
+ if ( args . Length != 1 )
43
43
{
44
44
Console . WriteLine ( "Usage: .. brokerList" ) ;
45
45
return ;
46
46
}
47
- var bootstrapServers = args [ 1 ] ;
47
+ var bootstrapServers = args [ 0 ] ;
48
48
var topicName = Guid . NewGuid ( ) . ToString ( ) ;
49
49
var groupId = Guid . NewGuid ( ) . ToString ( ) ;
50
50
@@ -142,12 +142,12 @@ public static async Task Main(string[] args)
142
142
}
143
143
}
144
144
145
- private static void createTopic ( ClientConfig config , String topicName )
145
+ private static void createTopic ( ClientConfig config , string topicName )
146
146
{
147
147
using ( var adminClient = new AdminClientBuilder ( config ) . Build ( ) )
148
148
{
149
149
adminClient . CreateTopicsAsync ( new TopicSpecification [ ] {
150
- new TopicSpecification { Name = topicName , ReplicationFactor = 3 , NumPartitions = 1 } } ) . Wait ( ) ; ;
150
+ new TopicSpecification { Name = topicName , ReplicationFactor = 3 , NumPartitions = 1 } } ) . Wait ( ) ;
151
151
}
152
152
}
153
153
}
Original file line number Diff line number Diff line change 2
2
3
3
<PropertyGroup >
4
4
<ProjectTypeGuids >{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids >
5
- <AssemblyName >OAuthOIDC </AssemblyName >
5
+ <AssemblyName >OAuthOIDCAzureIMDS </AssemblyName >
6
6
<TargetFramework >net8.0</TargetFramework >
7
7
<OutputType >Exe</OutputType >
8
8
<LangVersion >7.1</LangVersion >
Original file line number Diff line number Diff line change @@ -43,12 +43,12 @@ public class Program
43
43
44
44
public static async Task Main ( string [ ] args )
45
45
{
46
- if ( args . Length != 2 )
46
+ if ( args . Length != 1 )
47
47
{
48
48
Console . WriteLine ( "Usage: .. brokerList" ) ;
49
49
return ;
50
50
}
51
- var bootstrapServers = args [ 1 ] ;
51
+ var bootstrapServers = args [ 0 ] ;
52
52
var topicName = Guid . NewGuid ( ) . ToString ( ) ;
53
53
var groupId = Guid . NewGuid ( ) . ToString ( ) ;
54
54
@@ -144,12 +144,12 @@ public static async Task Main(string[] args)
144
144
}
145
145
}
146
146
147
- private static void createTopic ( ClientConfig config , String topicName )
147
+ private static void createTopic ( ClientConfig config , string topicName )
148
148
{
149
149
using ( var adminClient = new AdminClientBuilder ( config ) . Build ( ) )
150
150
{
151
151
adminClient . CreateTopicsAsync ( new TopicSpecification [ ] {
152
- new TopicSpecification { Name = topicName , ReplicationFactor = 3 , NumPartitions = 1 } } ) . Wait ( ) ; ;
152
+ new TopicSpecification { Name = topicName , ReplicationFactor = 3 , NumPartitions = 1 } } ) . Wait ( ) ;
153
153
}
154
154
}
155
155
}
Original file line number Diff line number Diff line change @@ -50,14 +50,14 @@ public class Program
50
50
51
51
public static async Task Main ( string [ ] args )
52
52
{
53
- if ( args . Length != 4 )
53
+ if ( args . Length != 3 )
54
54
{
55
55
Console . WriteLine ( "Usage: .. brokerList topic \" principal=<value> scope=<scope>\" " ) ;
56
56
return ;
57
57
}
58
- string bootstrapServers = args [ 1 ] ;
59
- string topicName = args [ 2 ] ;
60
- string oauthConf = args [ 3 ] ;
58
+ string bootstrapServers = args [ 0 ] ;
59
+ string topicName = args [ 1 ] ;
60
+ string oauthConf = args [ 2 ] ;
61
61
62
62
if ( ! Regex . IsMatch ( oauthConf , OauthConfigRegexPattern ) )
63
63
{
You can’t perform that action at this time.
0 commit comments