Ejemplo n.º 1
0
        public override int MarshalledLength(ObjectContainerBase stream, ClassAspect aspect
                                             )
        {
            int len = stream.StringIO().ShortLength(aspect.GetName());

            if (aspect is FieldMetadata)
            {
                FieldMetadata field = (FieldMetadata)aspect;
                if (field.NeedsArrayAndPrimitiveInfo())
                {
                    len += 1;
                }
                if (!(field is VirtualFieldMetadata))
                {
                    len += Const4.IdLength;
                }
            }
            return(len);
        }