public static CMethodBase FindMethodBase(CStringID agentClassId, CStringID propertyId)
 {
     if (Agent.Metas.ContainsKey(agentClassId))
     {
         Agent.CTagObjectDescriptor cTagObjectDescriptor = Agent.Metas[agentClassId];
         for (int i = 0; i < cTagObjectDescriptor.ms_methods.Count; i++)
         {
             CMethodBase cMethodBase = cTagObjectDescriptor.ms_methods[i];
             if (cMethodBase.GetId() == propertyId)
             {
                 return(cMethodBase);
             }
         }
         if (cTagObjectDescriptor.type != null && cTagObjectDescriptor.type.get_BaseType() != null)
         {
             CStringID agentClassId2 = new CStringID(cTagObjectDescriptor.type.get_BaseType().get_FullName());
             return(Agent.FindMethodBase(agentClassId2, propertyId));
         }
     }
     return(null);
 }
Example #2
0
 public static CMethodBase FindMethodBase(CStringID agentClassId, CStringID propertyId)
 {
     if (Metas.ContainsKey(agentClassId))
     {
         CTagObjectDescriptor descriptor = Metas[agentClassId];
         for (int i = 0; i < descriptor.ms_methods.Count; i++)
         {
             CMethodBase base2 = descriptor.ms_methods[i];
             if (base2.GetId() == propertyId)
             {
                 return(base2);
             }
         }
         if ((descriptor.type != null) && (descriptor.type.BaseType != null))
         {
             CStringID gid = new CStringID(descriptor.type.BaseType.FullName);
             return(FindMethodBase(gid, propertyId));
         }
     }
     return(null);
 }