1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 22:56:30 +09:00

ReadAllFields and ReadAllProperties now throws ArgumentNullException

This commit is contained in:
lidgren
2014-01-13 08:06:37 +00:00
parent faebe22254
commit aa2ce92148

View File

@@ -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
}
}
}
}
}