本文整理汇总了C#中IReflectClass.Reflector方法的典型用法代码示例。如果您正苦于以下问题:C# IReflectClass.Reflector方法的具体用法?C# IReflectClass.Reflector怎么用?C# IReflectClass.Reflector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IReflectClass
的用法示例。
在下文中一共展示了IReflectClass.Reflector方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HierarchyAnalyzer
public HierarchyAnalyzer(ClassMetadata storedClass, IReflectClass runtimeClass)
{
if (storedClass == null || runtimeClass == null)
{
throw new ArgumentNullException();
}
_storedClass = storedClass;
_runtimeClass = runtimeClass;
_objectClass = runtimeClass.Reflector().ForClass(typeof(object));
}
示例2: PrimitiveClass
private IReflectClass PrimitiveClass(IReflectClass baseClass)
{
Type primitive = (Type)Primitives.Get(baseClass.GetName());
if (primitive != null)
{
return baseClass.Reflector().ForClass(primitive);
}
return baseClass;
}
示例3: ArrayClass
private IReflectClass ArrayClass(IReflectClass clazz)
{
object proto = clazz.Reflector().Array().NewInstance(clazz, 0);
return clazz.Reflector().ForObject(proto);
}
示例4: IsObjectClass
private static bool IsObjectClass(IReflectClass claxx)
{
// TODO: We should send the whole class meta if we'd like to support
// java and .net communication (We have this request in our user forum
// http://developer.db4o.com/forums/thread/31504.aspx). If we only want
// to support java & .net platform separately, then this method should
// be moved to Platform4.
//return className.startsWith("java.lang.Object") || className.startsWith("System.Object");
return claxx.Reflector().ForClass(Const4.ClassObject) == claxx;
}
示例5: Match
public bool Match(IReflectClass candidate)
{
IReflectClass reflectClass = candidate.Reflector().ForClass(_class);
return candidate == reflectClass;
}
示例6: Iterator
public static IEnumerator Iterator(IReflectClass claxx, object obj)
{
IReflectArray reflectArray = claxx.Reflector().Array();
if (reflectArray.IsNDimensional(claxx))
{
return MultidimensionalArrayHandler.AllElementsMultidimensional(reflectArray, obj
);
}
return Db4objects.Db4o.Internal.Handlers.Array.ArrayHandler.AllElements(reflectArray
, obj);
}
示例7: AreEqual
public static bool AreEqual(Type expected, IReflectClass actual)
{
return actual.Reflector().ForClass(expected) == actual;
}