本文整理汇总了C#中DObject.GetPropertyDescriptorByFieldId方法的典型用法代码示例。如果您正苦于以下问题:C# DObject.GetPropertyDescriptorByFieldId方法的具体用法?C# DObject.GetPropertyDescriptorByFieldId怎么用?C# DObject.GetPropertyDescriptorByFieldId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DObject
的用法示例。
在下文中一共展示了DObject.GetPropertyDescriptorByFieldId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetInheritFieldUsingIC
public static void GetInheritFieldUsingIC(DObject obj, int fieldId, ref DValue v, int mapId, int fieldIndex, int inheritObjectCacheIndex)
{
#if __STAT__PD
if (mdr.Runtime.Instance.Configuration.ProfileStats)
{
mdr.Runtime.Instance.Counters.GetCounter("Inh IC calls").Count++;
}
#endif
if (mapId == obj.MapId)
{
DObject patentObj = JSRuntime._inheritPropertyObjectCache[inheritObjectCacheIndex];
if (patentObj != null)
{
v = patentObj.Fields[fieldIndex];
#if __STAT__PD
if (mdr.Runtime.Instance.Configuration.ProfileStats)
{
mdr.Runtime.Instance.Counters.GetCounter("Inh IC hits").Count++;
mdr.Runtime.Instance.Counters.GetCounter("Inh IC hit oindex_" + inheritObjectCacheIndex).Count++;
mdr.Runtime.Instance.Counters.GetCounter("Inh IC hit findex_" + fieldIndex).Count++;
}
#endif
}
}
else
{
obj.GetPropertyDescriptorByFieldId(fieldId).Get(obj, ref v);
#if __STAT__PD
if (mdr.Runtime.Instance.Configuration.ProfileStats)
{
mdr.Runtime.Instance.Counters.GetCounter("Inh IC misses").Count++;
}
#endif
}
}
示例2: UpdateMapProfileForWrite
public static void UpdateMapProfileForWrite(DObject obj, mjr.CodeGen.Profiler profiler, int profileIndex, int fieldId, PropertyMap oldMap)
{
if (profiler != null)
{
if (obj.Map == oldMap)
{
PropertyDescriptor pd = obj.GetPropertyDescriptorByFieldId(fieldId);
// obj.GetPropertyDescriptor
// Trace.WriteLine("YYY");
profiler.GetOrAddMapNodeProfile(profileIndex).UpdateNodeProfile(oldMap, pd);
}
}
}
示例3: GetFieldUsingIC
public static void GetFieldUsingIC(DObject obj, int fieldId, ref DValue v, int mapId, int fieldIndex)
{
#if __STAT__PD
if (mdr.Runtime.Instance.Configuration.ProfileStats)
{
mdr.Runtime.Instance.Counters.GetCounter("IC calls").Count++;
}
#endif
if (mapId == obj.MapId)
{
v = obj.Fields[fieldIndex];
#if __STAT__PD
if (mdr.Runtime.Instance.Configuration.ProfileStats)
{
mdr.Runtime.Instance.Counters.GetCounter("IC hit").Count++;
mdr.Runtime.Instance.Counters.GetCounter("IC hit findex_" + fieldIndex).Count++;
}
#endif
}
else
{
obj.GetPropertyDescriptorByFieldId(fieldId).Get(obj, ref v);
#if __STAT__PD
if (mdr.Runtime.Instance.Configuration.ProfileStats)
{
mdr.Runtime.Instance.Counters.GetCounter("IC miss").Count++;
}
#endif
}
}