Example #1
0
 public int GetFieldCount()
 {
     try
     {
         IReflectClass rClass = DataLayerCommon.ReflectClassForName(m_className);
         if (rClass != null)
         {
             string type1 = rClass.ToString();
             type1 = DataLayerCommon.PrimitiveType(type1);
             char[] arr = CommonValues.charArray;
             type1 = type1.Trim(arr);
             if (!CommonValues.IsPrimitive(type1) && !type1.Contains(BusinessConstants.DB4OBJECTS_SYS))
             {
                 IReflectField[] rFields = DataLayerCommon.GetDeclaredFieldsInHeirarchy(rClass);
                 return(rFields.Length);
             }
         }
         return(0);
     }
     catch (Exception oEx)
     {
         LoggingHelper.HandleException(oEx);
         return(0);
     }
 }
Example #2
0
 public static bool IsPrimitive(object expandedObj)
 {
     try
     {
         IReflectClass refClass = ReflectClassFor(expandedObj);// objectContainer.Ext().Reflector().ForObject(expandedObj);
         if (refClass != null)
         {
             string type = PrimitiveType(refClass.GetName());
             return(CommonValues.IsPrimitive(type));
         }
         return(false);
     }
     catch (Exception oEx)
     {
         LoggingHelper.HandleException(oEx);
         return(false);
     }
 }