public virtual CLS_Content.Value StaticValueGet(CLS_Content environment, string valuename)
{
var v = MemberValueGet(environment, null, valuename);
if (v == null)
{
if (type.BaseType != null)
{
return environment.environment.GetType(type.BaseType).function.StaticValueGet(environment, valuename);
}
else
{
throw new NotImplementedException();
}
}
else
{
return v;
}
//var targetf = type.GetField(valuename);
//if (targetf != null)
//{
// CLS_Content.Value v = new CLS_Content.Value();
// v.value = targetf.GetValue(null);
// v.type = targetf.FieldType;
// return v;
//}
//else
//{
// var methodf = type.GetMethod("get_" + valuename);
// if (methodf != null)
// {
// CLS_Content.Value v = new CLS_Content.Value();
// v.value = methodf.Invoke(null, null);
// v.type = methodf.ReturnType;
// return v;
// }
// //var targetf = type.GetField(valuename);
// //if (targetf != null)
// //{
// // CLS_Content.Value v = new CLS_Content.Value();
// // v.value = targetf.GetValue(null);
// // v.type = targetf.FieldType;
// // return v;
// //}
// else
// {
// var targete = type.GetEvent(valuename);
// if (targete != null)
// {
// CLS_Content.Value v = new CLS_Content.Value();
// v.value = new DeleEvent(null, targete);
// v.type = targete.EventHandlerType;
// return v;
// }
// }
//}
//if (type.BaseType != null)
//{
// return environment.environment.GetType(type.BaseType).function.StaticValueGet(environment, valuename);
//}
//throw new NotImplementedException();
}