
Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Well yes, so would I, but I am having to deal with badly designed legacy
code - my attempts to refactor by 'genericising' can unfortunately only go
so far and there are still large areas where it's frankly easiest to plonk a
large code snippet in when creating a new class for a certain purpose in the
system. Thus far we've had to create by hand... (The classes use an
underlying corresponding set of auto-generated classes which severely limits
the amount of generic code which can be created, and it's far far too risky
to do anything to change that autogenerated code right now, believe me. I
wish I could, but I have to work with what I've got.)
Anyway, found my problem: I had a double $ in the code snippet where there
was a replacement token, which stopped the snippet generation in its tracks.
>> Is there a maximum length for a code snippet? I have created quite a long
>> one (> 170 lines), which when I use it to generate code, it only
[quoted text clipped - 4 lines]
> verbatim on a regular basis? I'd get really worried if I started seeing
> that much code in multiple places.
Jon Skeet [C# MVP] - 11 Mar 2008 19:05 GMT
> Well yes, so would I, but I am having to deal with badly designed legacy
> code - my attempts to refactor by 'genericising' can unfortunately only go
[quoted text clipped - 9 lines]
> was a replacement token, which stopped the snippet generation in its
> tracks.
Ah, right. Wow, that does sound like a grim situation :(

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk