You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-15 06:36:30 +09:00
ReadAllFields and ReadAllProperties now throws ArgumentNullException
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010 Michael Lidgren
|
||||
/* Copyright (c) 2010 Michael Lidgren
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without
|
||||
@@ -37,7 +37,8 @@ namespace Lidgren.Network
|
||||
public void ReadAllFields(object target, BindingFlags flags)
|
||||
{
|
||||
if (target == null)
|
||||
return;
|
||||
throw new ArgumentNullException("target");
|
||||
|
||||
Type tp = target.GetType();
|
||||
|
||||
FieldInfo[] fields = tp.GetFields(flags);
|
||||
@@ -76,8 +77,6 @@ namespace Lidgren.Network
|
||||
if (target == null)
|
||||
throw new ArgumentNullException("target");
|
||||
|
||||
if (target == null)
|
||||
return;
|
||||
Type tp = target.GetType();
|
||||
|
||||
PropertyInfo[] fields = tp.GetProperties(flags);
|
||||
@@ -100,4 +99,4 @@ namespace Lidgren.Network
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user