@@ -74,13 +74,13 @@ using System.Reflection;
7474
7575namespace ReadQR
7676{
77- class Program
77+ internal static class Program
7878 {
79- static Configuration MakeConfiguration ()
79+ private static Configuration MakeConfiguration ()
8080 {
8181 var config = new Configuration ();
8282
83- var envToken = Environment .GetEnvironmentVariable (" TEST_CONFIGURATION_JWT_TOKEN" );
83+ string envToken = Environment .GetEnvironmentVariable (" TEST_CONFIGURATION_JWT_TOKEN" );
8484 if (string .IsNullOrEmpty (envToken ))
8585 {
8686 config .ClientId = " Client Id from https://dashboard.aspose.cloud/applications" ;
@@ -94,7 +94,7 @@ namespace ReadQR
9494 return config ;
9595 }
9696
97- static string ReadQR (IBarcodeApi api , string fileName )
97+ private static string ReadQR (IBarcodeApi api , string fileName )
9898 {
9999 using (FileStream imageStream = File .OpenRead (fileName ))
100100 {
@@ -109,10 +109,10 @@ namespace ReadQR
109109 static void Main (string [] args )
110110 {
111111 string fileName = Path .GetFullPath (Path .Join (
112- Path .GetDirectoryName (Assembly .GetEntryAssembly ().Location ),
112+ Path .GetDirectoryName (Assembly .GetEntryAssembly ()! .Location ),
113113 " .." , " .." , " .." , " .." ,
114114 " qr.png"
115- ));
115+ ));
116116
117117 var api = new BarcodeApi (MakeConfiguration ());
118118
@@ -159,14 +159,17 @@ namespace GenerateQR
159159 return config ;
160160 }
161161
162- static void GenerateQR (IBarcodeApi api , string fileName )
162+ private static void GenerateQR (IBarcodeApi api , string fileName )
163163 {
164164 using (Stream generated = api .GetBarcodeGenerate (
165- new GetBarcodeGenerateRequest (
166- EncodeBarcodeType .QR .ToString (),
167- " QR code text" ,
168- textLocation : " None" , format : " png" ))
169- )
165+ new GetBarcodeGenerateRequest (
166+ EncodeBarcodeType .QR .ToString (),
167+ " QR code text" )
168+ {
169+ TextLocation = " None" ,
170+ format = " png"
171+ })
172+ )
170173 {
171174 using (FileStream stream = File .Create (fileName ))
172175 {
@@ -178,10 +181,10 @@ namespace GenerateQR
178181 static void Main (string [] args )
179182 {
180183 string fileName = Path .GetFullPath (Path .Join (
181- Path .GetDirectoryName (Assembly .GetEntryAssembly ().Location ),
184+ Path .GetDirectoryName (Assembly .GetEntryAssembly ()! .Location ),
182185 " .." , " .." , " .." , " .." ,
183186 " qr.png"
184- ));
187+ ));
185188
186189 var api = new BarcodeApi (MakeConfiguration ());
187190
0 commit comments