internal static int GetRecordLength(object o, int PackSize = -1)
 {
     if (o == null)
     {
         return 0;
     }
     StructByteLengthHandler handler = new StructByteLengthHandler(PackSize);
     IRecordEnum intfRecEnum = handler;
     if (intfRecEnum == null)
     {
         throw ExceptionUtils.VbMakeException(5);
     }
     EnumerateUDT((ValueType) o, intfRecEnum, false);
     return handler.Length;
 }
示例#2
0
        internal static int GetRecordLength(object o, int PackSize = -1)
        {
            if (o == null)
            {
                return(0);
            }
            StructByteLengthHandler handler     = new StructByteLengthHandler(PackSize);
            IRecordEnum             intfRecEnum = handler;

            if (intfRecEnum == null)
            {
                throw ExceptionUtils.VbMakeException(5);
            }
            EnumerateUDT((ValueType)o, intfRecEnum, false);
            return(handler.Length);
        }