private static CustomAttributeArgument ReadSimpleArgument(ModuleDefinition parentModule,
                                                                  TypeSignature argumentType, IBinaryStreamReader reader)
        {
            var result = new CustomAttributeArgument(argumentType);

            result.Elements.Add(CustomAttributeArgumentElement.FromReader(parentModule, argumentType, reader));
            return(result);
        }
        private static CustomAttributeArgument ReadSzArrayArgument(ModuleDefinition parentModule,
                                                                   TypeSignature argumentType, IBinaryStreamReader reader)
        {
            var result = new CustomAttributeArgument(argumentType);

            var  arrayElementType = ((SzArrayTypeSignature)argumentType).BaseType;
            uint elementCount     = reader.CanRead(sizeof(uint)) ? reader.ReadUInt32() : uint.MaxValue;

            result.IsNullArray = elementCount == uint.MaxValue;

            if (!result.IsNullArray)
            {
                for (uint i = 0; i < elementCount; i++)
                {
                    var element = CustomAttributeArgumentElement.FromReader(parentModule, arrayElementType, reader);
                    result.Elements.Add(element);
                }
            }

            return(result);
        }