@@ -32,20 +32,16 @@ public sealed partial class Assert
3232 /// of <paramref name="value"/>.
3333 /// </exception>
3434 public static void IsInstanceOfType ( [ NotNull ] object ? value , [ NotNull ] Type ? expectedType )
35- {
36- IsInstanceOfType ( value , expectedType , string . Empty , null ) ;
37- }
35+ => IsInstanceOfType ( value , expectedType , string . Empty , null ) ;
3836
3937 /// <summary>
4038 /// Tests whether the specified object is an instance of the generic
41- /// type and throws an exception if the generictype is not in the
39+ /// type and throws an exception if the generic type is not in the
4240 /// inheritance hierarchy of the object.
4341 /// </summary>
4442 /// <typeparam name="T">The expected type of <paramref name="value"/>.</typeparam>
4543 public static void IsInstanceOfType < T > ( [ NotNull ] object ? value )
46- {
47- IsInstanceOfType ( value , typeof ( T ) , string . Empty , null ) ;
48- }
44+ => IsInstanceOfType ( value , typeof ( T ) , string . Empty , null ) ;
4945
5046 /// <summary>
5147 /// Tests whether the specified object is an instance of the expected
@@ -69,20 +65,16 @@ public static void IsInstanceOfType<T>([NotNull] object? value)
6965 /// of <paramref name="value"/>.
7066 /// </exception>
7167 public static void IsInstanceOfType ( [ NotNull ] object ? value , [ NotNull ] Type ? expectedType , string ? message )
72- {
73- IsInstanceOfType ( value , expectedType , message , null ) ;
74- }
68+ => IsInstanceOfType ( value , expectedType , message , null ) ;
7569
7670 /// <summary>
7771 /// Tests whether the specified object is an instance of the generic
78- /// type and throws an exception if the generictype is not in the
72+ /// type and throws an exception if the generic type is not in the
7973 /// inheritance hierarchy of the object.
8074 /// </summary>
8175 /// <typeparam name="T">The expected type of <paramref name="value"/>.</typeparam>
8276 public static void IsInstanceOfType < T > ( [ NotNull ] object ? value , string ? message )
83- {
84- IsInstanceOfType ( value , typeof ( T ) , message , null ) ;
85- }
77+ => IsInstanceOfType ( value , typeof ( T ) , message , null ) ;
8678
8779 /// <summary>
8880 /// Tests whether the specified object is an instance of the expected
@@ -108,7 +100,8 @@ public static void IsInstanceOfType<T>([NotNull] object? value, string? message)
108100 /// <paramref name="expectedType"/> is not in the inheritance hierarchy
109101 /// of <paramref name="value"/>.
110102 /// </exception>
111- public static void IsInstanceOfType ( [ NotNull ] object ? value , [ NotNull ] Type ? expectedType , string ? message , params object ? [ ] ? parameters )
103+ public static void IsInstanceOfType ( [ NotNull ] object ? value , [ NotNull ] Type ? expectedType , string ? message ,
104+ params object ? [ ] ? parameters )
112105 {
113106 if ( expectedType == null || value == null )
114107 {
@@ -132,14 +125,12 @@ public static void IsInstanceOfType([NotNull] object? value, [NotNull] Type? exp
132125
133126 /// <summary>
134127 /// Tests whether the specified object is an instance of the generic
135- /// type and throws an exception if the generictype is not in the
128+ /// type and throws an exception if the generic type is not in the
136129 /// inheritance hierarchy of the object.
137130 /// </summary>
138131 /// <typeparam name="T">The expected type of <paramref name="value"/>.</typeparam>
139132 public static void IsInstanceOfType < T > ( [ NotNull ] object ? value , string ? message , params object ? [ ] ? parameters )
140- {
141- IsInstanceOfType ( value , typeof ( T ) , message , parameters ) ;
142- }
133+ => IsInstanceOfType ( value , typeof ( T ) , message , parameters ) ;
143134
144135 /// <summary>
145136 /// Tests whether the specified object is not an instance of the wrong
@@ -158,9 +149,7 @@ public static void IsInstanceOfType<T>([NotNull] object? value, string? message,
158149 /// of <paramref name="value"/>.
159150 /// </exception>
160151 public static void IsNotInstanceOfType ( object ? value , [ NotNull ] Type ? wrongType )
161- {
162- IsNotInstanceOfType ( value , wrongType , string . Empty , null ) ;
163- }
152+ => IsNotInstanceOfType ( value , wrongType , string . Empty , null ) ;
164153
165154 /// <summary>
166155 /// Tests whether the specified object is not an instance of the wrong generic
@@ -169,9 +158,7 @@ public static void IsNotInstanceOfType(object? value, [NotNull] Type? wrongType)
169158 /// </summary>
170159 /// <typeparam name="T">The type that <paramref name="value"/> should not be.</typeparam>
171160 public static void IsNotInstanceOfType < T > ( object ? value )
172- {
173- IsNotInstanceOfType ( value , typeof ( T ) , string . Empty , null ) ;
174- }
161+ => IsNotInstanceOfType ( value , typeof ( T ) , string . Empty , null ) ;
175162
176163 /// <summary>
177164 /// Tests whether the specified object is not an instance of the wrong
@@ -195,9 +182,7 @@ public static void IsNotInstanceOfType<T>(object? value)
195182 /// of <paramref name="value"/>.
196183 /// </exception>
197184 public static void IsNotInstanceOfType ( object ? value , [ NotNull ] Type ? wrongType , string ? message )
198- {
199- IsNotInstanceOfType ( value , wrongType , message , null ) ;
200- }
185+ => IsNotInstanceOfType ( value , wrongType , message , null ) ;
201186
202187 /// <summary>
203188 /// Tests whether the specified object is not an instance of the wrong generic
@@ -206,9 +191,7 @@ public static void IsNotInstanceOfType(object? value, [NotNull] Type? wrongType,
206191 /// </summary>
207192 /// <typeparam name="T">The type that <paramref name="value"/> should not be.</typeparam>
208193 public static void IsNotInstanceOfType < T > ( object ? value , string ? message )
209- {
210- IsNotInstanceOfType ( value , typeof ( T ) , message , null ) ;
211- }
194+ => IsNotInstanceOfType ( value , typeof ( T ) , message , null ) ;
212195
213196 /// <summary>
214197 /// Tests whether the specified object is not an instance of the wrong
@@ -234,7 +217,8 @@ public static void IsNotInstanceOfType<T>(object? value, string? message)
234217 /// <paramref name="wrongType"/> is in the inheritance hierarchy
235218 /// of <paramref name="value"/>.
236219 /// </exception>
237- public static void IsNotInstanceOfType ( object ? value , [ NotNull ] Type ? wrongType , string ? message , params object ? [ ] ? parameters )
220+ public static void IsNotInstanceOfType ( object ? value , [ NotNull ] Type ? wrongType , string ? message ,
221+ params object ? [ ] ? parameters )
238222 {
239223 if ( wrongType == null )
240224 {
@@ -269,7 +253,5 @@ public static void IsNotInstanceOfType(object? value, [NotNull] Type? wrongType,
269253 /// </summary>
270254 /// <typeparam name="T">The type that <paramref name="value"/> should not be.</typeparam>
271255 public static void IsNotInstanceOfType < T > ( object ? value , string ? message , params object ? [ ] ? parameters )
272- {
273- IsNotInstanceOfType ( value , typeof ( T ) , message , parameters ) ;
274- }
256+ => IsNotInstanceOfType ( value , typeof ( T ) , message , parameters ) ;
275257}
0 commit comments