[Mono-dev] [PATCH] System.Security: trivial fixes for XmlDsig transforms

Sebastien Pouliot sebastien.pouliot at gmail.com
Thu Aug 14 08:04:32 EDT 2008


On Thu, 2008-08-14 at 06:35 +0200, Gert Driesen wrote:
> > Index: Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs
> > ===================================================================
> > --- Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs   (revision 110022)
> > +++ Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs   (working copy)
> > @@ -23,8 +23,17 @@
> >  
> >         // Note: GetInnerXml is protected in XmlDsigXsltTransform making it
> >         // difficult to test properly. This class "open it up" :-)
> > -       public class UnprotectedXmlDsigXsltTransform : XmlDsigXsltTransform {
> > +       public class UnprotectedXmlDsigXsltTransform : XmlDsigXsltTransform
> > +       {
> 
> Your interpretation was different than mine so you asked (I think I
> suggested it) on mono-dev about this (May 26th) and Miguel's answer (May
> 27th) was clear: 
>         "Same line, there are a couple of samples on that page."
> 
> Anyway please do not introduce unneeded changes into your patches.
> 
> > +               public UnprotectedXmlDsigXsltTransform ()
> > +               {
> > +               }
> >  
> > +               public UnprotectedXmlDsigXsltTransform (bool includeComments)
> > +                       : base (includeComments)
> > +               {
> > +               }
> 
> Did you include this in your remarks to signal that braces should go
> on the same line for .ctors (as opposed to methods, where they go on a
> new line)?

No.

> There's an example on the Coding Guidelines page that places braces on
> the same line for .ctor, but the guidelines also clearly state the
> braces should go on a new line for methods (even though there is
> sample code on that same page that places it on the same line, pff).

IMO ctors are (special) methods. However I probably (I can't go back in
time to prove it ;-) would not have refused the patch for this (alone).

> Perhaps we should include a table that clearly lists the bracing style
> we prefer:
> 
> Namespace              same line
> Types                  same line
> Methods                new line
> Constructors           new line  (?)
> Properties             same line
> Anonymous Methods      same line (?)
> Anonymous Types        same line (?)
> Control Blocks         same line

It would be interesting to have such a recapitulating table inside the
wiki.

However such table, if/when existing, should not be interpreted as "must
be changed at first opportunity" ;-)

Sebastien




More information about the Mono-devel-list mailing list