Trying to suppress StyleCop message SA1513:ClosingCurlyBracketMustBeFollowedByBlankLine

Posted by mattruma on Stack Overflow See other posts from Stack Overflow or by mattruma
Published on 2010-04-10T15:38:55Z Indexed on 2010/04/10 15:43 UTC
Read the original article Hit count: 1086

Filed under:
|

I am trying to suppress the following StyleCop message for a specific property:

SA1513: Statements or elements wrapped in curly brackets must be followed by a blank line.

I am trying to do the following, but it doesn't seem to work:

    [SuppressMessage("Microsoft.StyleCop.CSharp.DocumentationRules", "SA1513:ClosingCurlyBracketMustBeFollowedByBlankLine", Justification = "There are no issues with this code")]
    public string CustomerId
    {
        get
        {
            return this.GetProperty(CustomerIdProperty);
        }
        set
        {
            if (this.IsNew)
            {
                this.SetProperty(CustomerIdProperty, value);
            }
            else
            {
                throw new ReadOnlyException("Id value can only be changed for a new record.");
            }
        }
    }

Am I just doing something wrong? Or is this just not possible? It's a good rule, just not valid in my case for a property.

© Stack Overflow or respective owner

Related posts about c#

Related posts about stylecop