MudEngine:

- GameObject.GetProperty now supports returning Dynamic Types (Requires .NET 4.0)
This commit is contained in:
Scionwest_cp 2010-07-18 14:41:04 -07:00
parent 6282478c9f
commit ba95d6b070

View file

@ -47,12 +47,7 @@ namespace MudEngine.Scripting
} }
} }
} }
/* Dynamic Type Instancing isn't supported in .NET 3.5
public dynamic SetProperty()
{
return Instance;
}
*/
public object GetProperty(string propertyName) public object GetProperty(string propertyName)
{ {
string[] tokens = propertyName.Split('.'); string[] tokens = propertyName.Split('.');
@ -60,12 +55,12 @@ namespace MudEngine.Scripting
return previousProperty.GetValue(Instance, null); return previousProperty.GetValue(Instance, null);
} }
/* Dynamic Type Instancing isn't supported in .NET 3.5; Requires 4.0
public dynamic GetProperty() public dynamic GetProperty()
{ {
return Instance; return Instance;
} }
*/
public object InvokeMethod(string methodName, params object[] parameters) public object InvokeMethod(string methodName, params object[] parameters)
{ {
MethodInfo method = Instance.GetType().GetMethod(methodName); MethodInfo method = Instance.GetType().GetMethod(methodName);