@@ -167,7 +167,7 @@ private static ICodec GetCodec(string encoding, int encoding_version)
167167
168168 var codecConstructor = codec_type . GetConstructor ( Type . EmptyTypes ) ;
169169
170- if ( codecConstructor is null )
170+ if ( codecConstructor is null )
171171 {
172172 throw new InvalidOperationException ( "Failed to get codec constructor." ) ;
173173 }
@@ -252,7 +252,7 @@ public static Datamodel Load(Stream stream, DeferredMode defer_mode = DeferredMo
252252 public static Datamodel Load < T > ( Stream stream , DeferredMode defer_mode = DeferredMode . Automatic , ReflectionParams ? reflectionParams = null )
253253 where T : Element
254254 {
255- return Load_Internal < T > ( stream , defer_mode , reflectionParams ) ;
255+ return Load_Internal < T > ( stream , defer_mode , reflectionParams ) ;
256256 }
257257
258258 /// <summary>
@@ -262,7 +262,7 @@ public static Datamodel Load<T>(Stream stream, DeferredMode defer_mode = Deferre
262262 /// <param name="defer_mode">How to handle deferred loading.</param>
263263 public static Datamodel Load ( byte [ ] data , DeferredMode defer_mode = DeferredMode . Automatic )
264264 {
265- return Load_Internal < Element > ( new MemoryStream ( data , true ) , defer_mode ) ;
265+ return Load_Internal < Element > ( new MemoryStream ( data , true ) , defer_mode ) ;
266266 }
267267 /// <summary>
268268 /// Loads a Datamodel from a byte array.
@@ -287,7 +287,7 @@ public static Datamodel Load(string path, DeferredMode defer_mode = DeferredMode
287287 Datamodel ? dm = null ;
288288 try
289289 {
290- dm = Load_Internal < Element > ( stream , defer_mode ) ;
290+ dm = Load_Internal < Element > ( stream , defer_mode ) ;
291291 return dm ;
292292 }
293293 finally
@@ -310,22 +310,22 @@ public static Datamodel Load<T>(string path, ReflectionParams? reflectionParams
310310 private static Datamodel Load_Internal < T > ( Stream stream , DeferredMode defer_mode = DeferredMode . Automatic , ReflectionParams ? reflectionParams = null )
311311 where T : Element
312312 {
313- reflectionParams ??= new ( ) ;
313+ reflectionParams ??= new ( ) ;
314314
315315 var templateType = typeof ( T ) ;
316316
317- if ( templateType is null )
317+ if ( templateType is null )
318318 {
319319 throw new InvalidDataException ( "Template type can't be null" ) ;
320320 }
321321
322- if ( templateType == typeof ( Element ) )
322+ if ( templateType == typeof ( Element ) )
323323 {
324324 reflectionParams . AttemptReflection = false ;
325325 }
326326
327327 // if user doesnt specify these assume assembly and namespace of root node
328- if ( reflectionParams . Assembly == string . Empty )
328+ if ( reflectionParams . Assembly == string . Empty )
329329 {
330330 reflectionParams . Assembly = templateType . Assembly . GetName ( ) . Name ! ;
331331 }
@@ -389,7 +389,7 @@ private static Datamodel Load_Internal<T>(Stream stream, DeferredMode defer_mode
389389 {
390390 result = StubRequest ( id ) ;
391391
392- if ( result is null )
392+ if ( result is null )
393393 {
394394 throw new InvalidDataException ( "Stub request failed, result was null" ) ;
395395 }
@@ -484,7 +484,7 @@ public string Format
484484 get => _Format ;
485485 set
486486 {
487- if ( value is null )
487+ if ( value is null )
488488 {
489489 throw new InvalidDataException ( "Format can not be null" ) ;
490490 }
@@ -519,7 +519,7 @@ public string Encoding
519519 get => _Encoding ;
520520 set
521521 {
522- if ( value is null )
522+ if ( value is null )
523523 {
524524 throw new InvalidDataException ( "Encoding can not be null" ) ;
525525 }
@@ -779,7 +779,7 @@ public ImportJob(ImportRecursionMode import_mode, ImportOverwriteMode overwrite_
779779 local_element = null ;
780780 }
781781
782- if ( local_element is null )
782+ if ( local_element is null )
783783 {
784784 return null ;
785785 }
@@ -799,7 +799,7 @@ public ImportJob(ImportRecursionMode import_mode, ImportOverwriteMode overwrite_
799799 var list = ( System . Collections . ICollection ) attr . Value ;
800800 var inner_type = GetArrayInnerType ( list . GetType ( ) ) ;
801801
802- if ( inner_type is null )
802+ if ( inner_type is null )
803803 {
804804 throw new InvalidOperationException ( "Failed to get inner_type while importing element" ) ;
805805 }
@@ -935,7 +935,7 @@ internal DestubException(ElementArray array, int index, Exception innerException
935935 : base ( "An exception occured while destubbing an array item." , innerException )
936936 {
937937 var arrayOwner = array . Owner ;
938- if ( arrayOwner is not null )
938+ if ( arrayOwner is not null )
939939 {
940940 Data . Add ( "Element" , ( ( Element ) arrayOwner ) . ID ) ;
941941 }
0 commit comments