@@ -52,11 +52,10 @@ public object [] Data {
5252
5353 public override ValueTask < IReadOnlyCollection < ITheoryDataRow > > GetData ( MethodInfo testMethod , DisposalTracker disposalTracker )
5454 {
55- var traits = new Dictionary < string , HashSet < string > > ( StringComparer . OrdinalIgnoreCase ) ;
56- TestIntrospectionHelper . MergeTraitsInto ( traits , Traits ) ;
57- return new ( [
58- new TheoryDataRow ( Data )
59- {
55+ var traits = new Dictionary < string , HashSet < string > > ( StringComparer . OrdinalIgnoreCase ) ;
56+ TestIntrospectionHelper . MergeTraitsInto ( traits , Traits ) ;
57+ return new ( [
58+ new TheoryDataRow ( Data ) {
6059 Explicit = ExplicitAsNullable ,
6160 Label = Label ,
6261 Skip = Skip ,
@@ -65,7 +64,7 @@ public override ValueTask<IReadOnlyCollection<ITheoryDataRow>> GetData (MethodIn
6564 Traits = traits ,
6665 }
6766 ] ) ;
68-
67+
6968 }
7069
7170 }
@@ -79,21 +78,21 @@ public AllSupportedPlatformsAttribute (params object [] parameters)
7978 {
8079 dataValues = parameters ;
8180 }
82-
81+
8382 public override bool SupportsDiscoveryEnumeration ( ) => true ;
84-
85- public override ValueTask < IReadOnlyCollection < ITheoryDataRow > > GetData (
83+
84+ public override ValueTask < IReadOnlyCollection < ITheoryDataRow > > GetData (
8685 MethodInfo testMethod ,
8786 DisposalTracker disposalTracker )
8887 {
89- var result = new List < ITheoryDataRow > ( ) ;
88+ var result = new List < ITheoryDataRow > ( ) ;
9089
9190 foreach ( var platform in Configuration . GetIncludedPlatforms ( ) ) {
9291 var row = dataValues . Prepend ( platform ) . ToArray ( ) ;
9392 result . Add ( ConvertDataRow ( row ) ) ;
9493 }
9594
96- return ValueTask . FromResult ( result . CastOrToReadOnlyCollection ( ) ) ;
95+ return ValueTask . FromResult ( result . CastOrToReadOnlyCollection ( ) ) ;
9796 }
9897 }
9998
@@ -105,60 +104,56 @@ public AllSupportedPlatformsClassDataAttribute ()
105104 {
106105 dataAttributeType = typeof ( T ) ;
107106 }
108-
109- public override bool SupportsDiscoveryEnumeration ( ) =>
110- ! typeof ( IDisposable ) . IsAssignableFrom ( dataAttributeType ) && ! typeof ( IAsyncDisposable ) . IsAssignableFrom ( dataAttributeType ) ;
111-
107+
108+ public override bool SupportsDiscoveryEnumeration ( ) =>
109+ ! typeof ( IDisposable ) . IsAssignableFrom ( dataAttributeType ) && ! typeof ( IAsyncDisposable ) . IsAssignableFrom ( dataAttributeType ) ;
110+
112111 /// <inheritdoc/>
113- protected override ITheoryDataRow ConvertDataRow ( object dataRow )
112+ protected override ITheoryDataRow ConvertDataRow ( object dataRow )
114113 {
115- Guard . ArgumentNotNull ( dataRow ) ;
114+ Guard . ArgumentNotNull ( dataRow ) ;
116115
117- try
118- {
119- return base . ConvertDataRow ( dataRow ) ;
120- }
121- catch ( ArgumentException )
122- {
123- throw new ArgumentException (
124- string . Format (
116+ try {
117+ return base . ConvertDataRow ( dataRow ) ;
118+ } catch ( ArgumentException ) {
119+ throw new ArgumentException (
120+ string . Format (
125121 CultureInfo . CurrentCulture ,
126122 "Class '{0}' yielded an item of type '{1}' which is not an 'object?[]', 'Xunit.ITheoryDataRow' or 'System.Runtime.CompilerServices.ITuple'" ,
127123 dataAttributeType . FullName ,
128- dataRow ? . GetType ( ) . SafeName ( )
124+ dataRow ? . GetType ( ) . SafeName ( )
129125 ) ,
130- nameof ( dataRow )
126+ nameof ( dataRow )
131127 ) ;
132128 }
133129 }
134-
135- public override async ValueTask < IReadOnlyCollection < ITheoryDataRow > > GetData (
130+
131+ public override async ValueTask < IReadOnlyCollection < ITheoryDataRow > > GetData (
136132 MethodInfo testMethod ,
137133 DisposalTracker disposalTracker )
138134 {
139135 var classInstance = Activator . CreateInstance ( dataAttributeType ) ;
140- disposalTracker . Add ( classInstance ) ;
136+ disposalTracker . Add ( classInstance ) ;
141137
142138 if ( classInstance is IAsyncLifetime classLifetime )
143- await classLifetime . InitializeAsync ( ) ;
139+ await classLifetime . InitializeAsync ( ) ;
144140
145- if ( classInstance is IEnumerable < object [ ] > dataItems )
146- {
147- var result = new List < ITheoryDataRow > ( ) ;
141+ if ( classInstance is IEnumerable < object [ ] > dataItems ) {
142+ var result = new List < ITheoryDataRow > ( ) ;
148143
149144 foreach ( var platform in Configuration . GetIncludedPlatforms ( ) ) {
150145 foreach ( var row in dataItems ) {
151-
146+
152147 var platformRow = row . Prepend ( platform ) . ToArray ( ) ;
153148 result . Add ( ConvertDataRow ( platformRow ) ) ;
154149 }
155150 }
156151
157- return result . CastOrToReadOnlyCollection ( ) ;
152+ return result . CastOrToReadOnlyCollection ( ) ;
158153 }
159154
160- throw new ArgumentException (
161- string . Format (
155+ throw new ArgumentException (
156+ string . Format (
162157 CultureInfo . CurrentCulture ,
163158 "'{0}' must implement one of the following interfaces to be used as ClassData:{1}- IEnumerable<object[]>{1}" ,
164159 dataAttributeType . FullName ,
0 commit comments