public virtual void Test4() { Array o = System.Array.CreateInstance(typeof(int), 5); o.SetValue(0, 1); o.SetValue(1, 2); AssertEquals(true, o.GetType().IsArray); AssertEquals("int", o.GetType().GetElementType().FullName); AssertEquals(1, OdbReflection.GetArrayElement(o, 0)); AssertEquals(2, OdbReflection.GetArrayElement(o, 1)); }
public static string GetFullClassName(SimpleNativeQuery query) { System.Type clazz = query.GetType(); System.Reflection.MethodInfo[] methods = OdbReflection.GetMethods(clazz); for (int i = 0; i < methods.Length; i++) { System.Reflection.MethodInfo method = methods[i]; System.Type[] attributes = OdbReflection.GetAttributeTypes(method); if (method.Name.Equals(MatchMethodName) && attributes.Length == 1) { clazz = attributes[0]; methodsCache.Add(query, method); return(OdbClassUtil.GetFullName(clazz)); } } throw new ODBRuntimeException(NeoDatisError.QueryNqMatchMethodNotImplemented.AddParameter(query.GetType().FullName)); }