File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 - name : Setup .NET
1717 uses : actions/setup-dotnet@v4
1818 with :
19- dotnet-version : 6 .0.x
19+ dotnet-version : 10 .0.x
2020 - name : Restore dependencies
2121 run : dotnet restore
2222 - name : Build
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ class SomeClass
1616 // This field will be ignored by SharpConfig
1717 // when creating sections from objects and vice versa.
1818 [ SharpConfig . Ignore ]
19+ #pragma warning disable CS0649 // Field is never assigned to
1920 public int SomeIgnoredField ;
21+ #pragma warning restore CS0649
2022
2123 // Same for this property.
2224 [ SharpConfig . Ignore ]
@@ -156,10 +158,10 @@ private static void HowToHandleArrays()
156158 // There is also a non-generic variant of GetValueArray:
157159 var sameValuesButObjects = cfg [ "GeneralSection" ] [ "SomeInts" ] . GetValueArray ( typeof ( int ) ) ;
158160
159- PrintArray ( "someIntValuesBack" , someIntValuesBack ) ;
160- PrintArray ( "sameValuesButFloats" , sameValuesButFloats ) ;
161- PrintArray ( "sameValuesButStrings" , sameValuesButStrings ) ;
162- PrintArray ( "sameValuesButObjects" , sameValuesButObjects ) ;
161+ PrintArray ( "someIntValuesBack" , someIntValuesBack ! ) ;
162+ PrintArray ( "sameValuesButFloats" , sameValuesButFloats ! ) ;
163+ PrintArray ( "sameValuesButStrings" , sameValuesButStrings ! ) ;
164+ PrintArray ( "sameValuesButObjects" , sameValuesButObjects ! ) ;
163165 }
164166
165167 /// <summary>
Original file line number Diff line number Diff line change @@ -322,7 +322,9 @@ public void ArrayParsing()
322322 sealed class SectionTestObject
323323 {
324324 public string [ ] ? SomeArrayProp { get ; set ; }
325+ #pragma warning disable CS0649 // Field is never assigned to (assigned via SharpConfig)
325326 public string [ ] ? SomeArrayField ;
327+ #pragma warning restore CS0649
326328 }
327329
328330 [ Test ]
You can’t perform that action at this time.
0 commit comments