I don't know how to add a mask to a line using svg .net like this:
<svg height="210" width="500">
<mask id="myMask">`
<rect x="0" y="0" width="50" height="50" fill="white" />
<rect x="170" y="150" width="50" height="50" fill="white" />
</mask>
<line x1="0" y1="0" x2="200" y2="200" style="stroke:gray;stroke-width:2" stroke-dasharray="5, 5" />
<line x1="0" y1="0" x2="200" y2="200" style="stroke:blue;stroke-width:2" mask="url(#myMask)"/>
</svg>