コード例 #1
0
ファイル: DefaultBeanType.cs プロジェクト: nesrinesghaier/upa
 public virtual System.Reflection.FieldInfo FindField(string name, Net.Vpc.Upa.Filters.ObjectFilter <System.Reflection.FieldInfo> filter)
 {
     System.Collections.Generic.IList <System.Reflection.FieldInfo> fieldsList = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <string, System.Collections.Generic.IList <System.Reflection.FieldInfo> >(fields, name);
     if (fieldsList == null)
     {
         if (!fields.ContainsKey(name))
         {
             fieldsList = Net.Vpc.Upa.Impl.Util.PlatformUtils.FindFields(platformType, name);
             if ((fieldsList).Count > 0)
             {
                 fields[name] = fieldsList;
             }
             else
             {
                 fields[name] = null;
             }
         }
     }
     if (filter == null)
     {
         return(fieldsList[0]);
     }
     foreach (System.Reflection.FieldInfo field in fieldsList)
     {
         if (filter.Accept(field))
         {
             return(field);
         }
     }
     return(null);
 }
コード例 #2
0
ファイル: RecordBeanType.cs プロジェクト: nesrinesghaier/upa
 public virtual System.Reflection.FieldInfo FindField(string name, Net.Vpc.Upa.Filters.ObjectFilter <System.Reflection.FieldInfo> filter)
 {
     return(null);
 }
コード例 #3
0
ファイル: PlatformUtils.cs プロジェクト: nesrinesghaier/upa
 public static System.Reflection.FieldInfo FindField(System.Type clz, string name, Net.Vpc.Upa.Filters.ObjectFilter <System.Reflection.FieldInfo> filter)
 {
     System.Type r = clz;
     while (r != null)
     {
         System.Reflection.FieldInfo f = null;
         try {
             f = r.GetField(name, System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Instance);
         } catch (System.Exception ex) {
         }
         //ignore
         if (f != null && (filter == null || filter.Accept(f)))
         {
             return(f);
         }
         r = (r).BaseType;
     }
     return(null);
 }
コード例 #4
0
 public virtual System.Reflection.FieldInfo FindField(string name, Net.Vpc.Upa.Filters.ObjectFilter <System.Reflection.FieldInfo> filter)
 {
     return(platformBeanType.FindField(name, filter));
 }
コード例 #5
0
 public SimpleEntityFilter(Net.Vpc.Upa.Filters.ObjectFilter <string> name, bool includeSystem)
 {
     this.name          = name;
     this.includeSystem = includeSystem;
 }