• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eclipse-aascw / aas-core-codegen / 34750135279
90%

Build:
DEFAULT BRANCH: main
Ran 13 Sep 2026 09:48AM UTC
Jobs 3
Files 269
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Sep 2026 09:44AM UTC coverage: 85.253% (+0.004%) from 85.249%
34750135279

push

github

web-flow
Compose the C# XML serialization out of writers (#687)

This is the write-side dual of #686, and finishes the decomposition
of ``csharp/lib/_generate_xmlization.py``: every property is now written
by one call whose content writer has been composed once into a field,
instead of by a lambda built at the call site.

Measured on the AAS meta-model fixture, the writer region of
``xmlization.cs`` goes 3,908 -> 2,464 lines (-37%), and the file as
a whole 12,471 -> 11,023. Per property 8.1 -> ~5 lines:

    if (that.SemanticId != null)
    {
        WriteElement(
            "semanticId", that.SemanticId, writer, WriteIReference);
    }

The line count is the lesser win. Every content serializer used to be
a capturing lambda composed at the call site -- 212 ``this.`` references
in that region -- which allocates a closure on every single write; the
read side measured that at 152 bytes/op and rejected it. All 276 call
sites now read a ``static readonly`` field instead, so the write path
allocates nothing regardless of the consumer's C# version.

One delegate, ``ContentWriter<in T>``, replaces
``ElementContentSerializer<T>``. ``in T`` is the dual of the read side's
``out T``: it is what lets the single static ``WriteIClass(Aas.IClass,
...)`` serve as the item writer of a list or a tuple of any interface.
Deliberately *one* delegate, not a content/element pair: on the write
side both would have identical signatures, since the content/element
split is a read-side concern (``isEmpty``).

``WriteElement`` and ``WrapInElement`` are one body with two entry
points. The applied form is what the 276 property sites call;
``WrapInElement`` is the partial application C# does not give for free,
and is used *only* for the ``<v>`` element of a list item and the
positional ``v1``, ``v2``, ... of a tuple item. It carries a doc comment
saying so, because its payoff is invisible from its call count: it is
what lets ``WriteList`` and ``WriteTupleN`` take a *single* item-writer
type... (continued)

174 of 183 new or added lines in 1 file covered. (95.08%)

2 existing lines in 1 file now uncovered.

33906 of 39771 relevant lines covered (85.25%)

2.56 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
93.41
0.57% aas_core_codegen/csharp/lib/_generate_xmlization.py

Coverage Regressions

Lines Coverage ∆ File
2
93.41
0.57% aas_core_codegen/csharp/lib/_generate_xmlization.py
Jobs
ID Job ID Ran Files Coverage
1 3.10 - 34750135279.1 13 Sep 2026 09:51AM UTC 269
85.25
GitHub Action Run
2 3.11 - 34750135279.2 13 Sep 2026 09:51AM UTC 269
85.25
GitHub Action Run
3 3.12 - 34750135279.3 13 Sep 2026 09:51AM UTC 269
85.25
GitHub Action Run
Source Files on build 34750135279
  • Tree
  • List 269
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2542c019 on github
  • Prev Build on main (#34741996127)
  • Next Build on main (#34776303801)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc