本文整理汇总了C#中IReflectClass.GetName方法的典型用法代码示例。如果您正苦于以下问题:C# IReflectClass.GetName方法的具体用法?C# IReflectClass.GetName怎么用?C# IReflectClass.GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IReflectClass
的用法示例。
在下文中一共展示了IReflectClass.GetName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NewUserClassMeta
private ClassInfo NewUserClassMeta(IReflectClass claxx)
{
ClassInfo classMeta = ClassInfo.NewUserClass(claxx.GetName());
classMeta.SetSuperClass(MapSuperclass(claxx));
RegisterClassMeta(claxx.GetName(), classMeta);
classMeta.SetFields(MapFields(claxx.GetDeclaredFields(), ShouldStoreTransientFields
(claxx)));
return classMeta;
}
示例2: GetClassMeta
public virtual ClassInfo GetClassMeta(IReflectClass claxx)
{
if (IsObjectClass(claxx))
{
return ClassInfo.NewSystemClass(claxx.GetName());
}
ClassInfo existing = LookupClassMeta(claxx.GetName());
if (existing != null)
{
return existing;
}
return NewUserClassMeta(claxx);
}
示例3: ThrowUnsupportedAdd
private void ThrowUnsupportedAdd(IReflectClass runtimeAncestor)
{
throw new InvalidOperationException("Unsupported class hierarchy change. Class "
+ runtimeAncestor.GetName() + " was added to hierarchy of " +
_runtimeClass.GetName
());
}
示例4: QConClass
internal QConClass(Transaction trans, QCon parent, QField field, IReflectClass claxx
) : base(trans, parent, field, null)
{
// C/S
if (claxx != null)
{
ObjectContainerBase container = trans.Container();
_classMetadata = container.ClassMetadataForReflectClass(claxx);
if (_classMetadata == null)
{
// could be an aliased class, try to resolve.
string className = claxx.GetName();
string aliasRunTimeName = container.Config().ResolveAliasStoredName(className);
if (!className.Equals(aliasRunTimeName))
{
_classMetadata = container.ClassMetadataForName(aliasRunTimeName);
}
}
if (claxx.Equals(container._handlers.IclassObject))
{
_classMetadata = (ClassMetadata)_classMetadata.TypeHandler();
}
}
_claxx = claxx;
}
示例5: NameOf
private static TypeName NameOf(IReflectClass typeToFind)
{
var name = TypeNameParser.ParseString(typeToFind.GetName());
if (typeToFind.IsArray() && !name.ArrayOf.HasValue)
{
return TypeName.CreateArrayOf(name, 1);
}
return name;
}
示例6: Resolve
public IType Resolve(IReflectClass klass)
{
if (klass == null)
{
return null;
}
string className = klass.GetName();
if (!_resolved.ContainsKey(className))
{
_resolved[className] = new TypeImpl(klass, this);
}
return _resolved[className];
}
示例7: CallConstructorSpecialized
private TernaryBool CallConstructorSpecialized(IReflectClass clazz)
{
Config4Class clazzConfig = _config.ConfigClass(clazz.GetName());
if (clazzConfig != null)
{
TernaryBool res = clazzConfig.CallConstructor();
if (!res.IsUnspecified())
{
return res;
}
}
if (Platform4.IsEnum(_config.Reflector(), clazz))
{
return TernaryBool.No;
}
IReflectClass ancestor = clazz.GetSuperclass();
if (ancestor != null)
{
return CallConstructorSpecialized(ancestor);
}
return TernaryBool.Unspecified;
}
示例8: ClassMetadataForReflectClass
public override ClassMetadata ClassMetadataForReflectClass(IReflectClass claxx)
{
ClassMetadata classMetadata = base.ClassMetadataForReflectClass(claxx);
if (classMetadata != null)
{
return classMetadata;
}
string className = Config().ResolveAliasRuntimeName(claxx.GetName());
if (ClassMetadataIdForName(className) == 0)
{
return null;
}
return ProduceClassMetadata(claxx);
}
示例9: ObjectNotStorableException
public ObjectNotStorableException(IReflectClass clazz) : base(Messages
.Get(clazz.IsImmutable() ? 59 : 45, clazz.GetName()))
{
}
示例10: ShouldStoreTransientFields
private bool ShouldStoreTransientFields(IReflectClass claxx)
{
Config4Class configClass = _config.ConfigClass(claxx.GetName());
return configClass == null ? false : configClass.StoreTransientFields();
}
示例11: ReadClassMetadata
private ClassMetadata ReadClassMetadata(IReflectClass reflectClazz)
{
ClassMetadata clazz = (ClassMetadata)_classMetadataByBytes.Remove(GetNameBytes(reflectClazz
.GetName()));
if (clazz == null)
{
return null;
}
return ReadClassMetadata(clazz, reflectClazz);
}
示例12: ObjectNotStorableException
public ObjectNotStorableException(IReflectClass a_class) : base(Db4objects.Db4o.Internal.Messages
.Get(a_class.IsPrimitive() ? 59 : 45, a_class.GetName()))
{
}
示例13: ObjectNotStorableException
public ObjectNotStorableException(IReflectClass clazz) : base(Db4objects.Db4o.Internal.Messages
.Get(clazz.IsSimple() ? 59 : 45, clazz.GetName()))
{
}
示例14: EnsureDelegate
internal virtual GenericClass EnsureDelegate(IReflectClass
clazz)
{
if (clazz == null)
{
return null;
}
var claxx = (GenericClass
) _repository.LookupByName(clazz.GetName());
if (claxx == null)
{
// We don't have to worry about the superclass, it can be null
// because handling is delegated anyway
claxx = GenericClass(clazz);
_repository.Register(claxx);
}
return claxx;
}
示例15: Prototype
public Prototype(Prototypes _enclosing, IReflectClass claxx)
{
this._enclosing = _enclosing;
this._object = (object)claxx.NewInstance();
if (this._object == null)
{
throw new PrototypesException("Prototype could not be created for class " + claxx
.GetName());
}
this.Analyze(this._object, claxx, this._enclosing._recursionDepth, null);
}