You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-17 15:46:33 +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
|
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
|
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)
|
public void ReadAllFields(object target, BindingFlags flags)
|
||||||
{
|
{
|
||||||
if (target == null)
|
if (target == null)
|
||||||
return;
|
throw new ArgumentNullException("target");
|
||||||
|
|
||||||
Type tp = target.GetType();
|
Type tp = target.GetType();
|
||||||
|
|
||||||
FieldInfo[] fields = tp.GetFields(flags);
|
FieldInfo[] fields = tp.GetFields(flags);
|
||||||
@@ -76,8 +77,6 @@ namespace Lidgren.Network
|
|||||||
if (target == null)
|
if (target == null)
|
||||||
throw new ArgumentNullException("target");
|
throw new ArgumentNullException("target");
|
||||||
|
|
||||||
if (target == null)
|
|
||||||
return;
|
|
||||||
Type tp = target.GetType();
|
Type tp = target.GetType();
|
||||||
|
|
||||||
PropertyInfo[] fields = tp.GetProperties(flags);
|
PropertyInfo[] fields = tp.GetProperties(flags);
|
||||||
|
|||||||
Reference in New Issue
Block a user