1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 23:26:32 +09:00

Changed target framework to 4.5.1 for all projects

Changed some minor things after running .net portability analyzer
Fixed a bunch of warnings (mostly CLS compliance)
This commit is contained in:
lidgren
2014-08-10 09:27:36 +00:00
parent 5f5cd5ecf6
commit 54ff6f1c37
50 changed files with 843 additions and 870 deletions

View File

@@ -78,13 +78,16 @@ namespace Lidgren.Network
foreach (PropertyInfo fi in fields)
{
MethodInfo getMethod = fi.GetGetMethod((flags & BindingFlags.NonPublic) == BindingFlags.NonPublic);
object value = getMethod.Invoke(ob, null);
MethodInfo getMethod = fi.GetMethod;
if (getMethod != null)
{
object value = getMethod.Invoke(ob, null);
// find the appropriate Write method
MethodInfo writeMethod;
if (s_writeMethods.TryGetValue(fi.PropertyType, out writeMethod))
writeMethod.Invoke(this, new object[] { value });
// find the appropriate Write method
MethodInfo writeMethod;
if (s_writeMethods.TryGetValue(fi.PropertyType, out writeMethod))
writeMethod.Invoke(this, new object[] { value });
}
}
}
}