Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am looking for the same things.</p> <p>Here is a Custom Type member layout:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns"&gt; &lt;!--Do not reorder COM interfaces and structs marked by StructLayout attribute--&gt; &lt;Pattern&gt; &lt;Match&gt; &lt;Or Weight="100"&gt; &lt;And&gt; &lt;Kind Is="interface"/&gt; &lt;HasAttribute CLRName="System.Runtime.InteropServices.InterfaceTypeAttribute"/&gt; &lt;/And&gt; &lt;HasAttribute CLRName="System.Runtime.InteropServices.StructLayoutAttribute"/&gt; &lt;/Or&gt; &lt;/Match&gt; &lt;/Pattern&gt; &lt;!--Special formatting of NUnit test fixture--&gt; &lt;Pattern RemoveAllRegions="true"&gt; &lt;Match&gt; &lt;And Weight="100"&gt; &lt;Kind Is="class"/&gt; &lt;HasAttribute CLRName="NUnit.Framework.TestFixtureAttribute" Inherit="true"/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;!--Setup/Teardow--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And&gt; &lt;Kind Is="method"/&gt; &lt;Or&gt; &lt;HasAttribute CLRName="NUnit.Framework.SetUpAttribute" Inherit="true"/&gt; &lt;HasAttribute CLRName="NUnit.Framework.TearDownAttribute" Inherit="true"/&gt; &lt;HasAttribute CLRName="NUnit.Framework.FixtureSetUpAttribute" Inherit="true"/&gt; &lt;HasAttribute CLRName="NUnit.Framework.FixtureTearDownAttribute" Inherit="true"/&gt; &lt;/Or&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Group Region="Setup/Teardown"/&gt; &lt;/Entry&gt; &lt;!--All other members--&gt; &lt;Entry/&gt; &lt;!--Test methods--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And Weight="100"&gt; &lt;Kind Is="method"/&gt; &lt;HasAttribute CLRName="NUnit.Framework.TestAttribute" Inherit="false"/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;/Entry&gt; &lt;/Pattern&gt; &lt;!--Default pattern--&gt; &lt;Pattern&gt; &lt;!--public delegate--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And Weight="100"&gt; &lt;Access Is="public"/&gt; &lt;Kind Is="delegate"/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group Region="Delegates"/&gt; &lt;/Entry&gt; &lt;!--public enum--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And Weight="100"&gt; &lt;Access Is="public"/&gt; &lt;Kind Is="enum"/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group&gt; &lt;Name Region="${Name} enum"/&gt; &lt;/Group&gt; &lt;/Entry&gt; &lt;!--fields and constants--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;Or&gt; &lt;Kind Is="constant"/&gt; &lt;Kind Is="field"/&gt; &lt;/Or&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Kind Order="constant field"/&gt; &lt;Readonly/&gt; &lt;Static/&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group Region="Fields"/&gt; &lt;/Entry&gt; &lt;!-- Events--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;Kind Is="event"/&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group Region="Events"/&gt; &lt;/Entry&gt; &lt;!--Constructors. Place static one first--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;Kind Is="constructor"/&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Static/&gt; &lt;/Sort&gt; &lt;Group Region="Constructors"/&gt; &lt;/Entry&gt; &lt;!--properties, indexers--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;Or&gt; &lt;Kind Is="property"/&gt; &lt;Kind Is="indexer"/&gt; &lt;/Or&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group Region="Properties"/&gt; &lt;/Entry&gt; &lt;!--interface implementations--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And Weight="100"&gt; &lt;Kind Is="member"/&gt; &lt;ImplementsInterface/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;ImplementsInterface Immediate="true"/&gt; &lt;Kind Order="property"/&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group&gt; &lt;ImplementsInterface Immediate="true" Region="${ImplementsInterface} Members"/&gt; &lt;/Group&gt; &lt;/Entry&gt; &lt;!-- public Methods --&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And&gt; &lt;Kind Is="method"/&gt; &lt;Access Is="public"/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Static/&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group&gt; &lt;/Group&gt; &lt;/Entry&gt; &lt;!-- internal Methods --&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And&gt; &lt;Kind Is="method"/&gt; &lt;Access Is="internal"/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Static/&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group&gt; &lt;/Group&gt; &lt;/Entry&gt; &lt;!--protected internal Methods --&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And&gt; &lt;Kind Is="method"/&gt; &lt;Access Is="protected-internal"/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Static/&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group&gt; &lt;/Group&gt; &lt;/Entry&gt; &lt;!-- protected Methods --&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And&gt; &lt;Kind Is="method"/&gt; &lt;Access Is="protected"/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Static/&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group&gt; &lt;/Group&gt; &lt;/Entry&gt; &lt;!-- private Methods --&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And&gt; &lt;Kind Is="method"/&gt; &lt;Access Is="private"/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Static/&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group&gt; &lt;/Group&gt; &lt;/Entry&gt; &lt;!--all other members--&gt; &lt;Entry/&gt; &lt;!--nested types--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;Kind Is="type"/&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;Group&gt; &lt;Name Region="Nested type: ${Name}"/&gt; &lt;/Group&gt; &lt;/Entry&gt; &lt;/Pattern&gt; &lt;/Patterns&gt; &lt;!-- I. Overall I.1 Each pattern can have &lt;Match&gt;....&lt;/Match&gt; element. For the given type declaration, the pattern with the match, evaluated to 'true' with the largest weight, will be used I.2 Each pattern consists of the sequence of &lt;Entry&gt;...&lt;/Entry&gt; elements. Type member declarations are distributed between entries I.3 If pattern has RemoveAllRegions="true" attribute, then all regions will be cleared prior to reordering. Otherwise, only auto-generated regions will be cleared I.4 The contents of each entry is sorted by given keys (First key is primary, next key is secondary, etc). Then the declarations are grouped and en-regioned by given property II. Available match operands Each operand may have Weight="..." attribute. This weight will be added to the match weight if the operand is evaluated to 'true'.The default weight is 1 II.1 Boolean functions: II.1.1 &lt;And&gt;....&lt;/And&gt; II.1.2 &lt;Or&gt;....&lt;/Or&gt; II.1.3 &lt;Not&gt;....&lt;/Not&gt; II.2 Operands II.2.1 &lt;Kind Is="..."/&gt;. Kinds are: class, struct, interface, enum, delegate, type, constructor, destructor, property, indexer, method, operator, field, constant, event, member II.2.2 &lt;Name Is="..." [IgnoreCase="true/false"] /&gt;. The 'Is' attribute contains regular expression II.2.3 &lt;HasAttribute CLRName="..." [Inherit="true/false"] /&gt;. The 'CLRName' attribute contains regular expression II.2.4 &lt;Access Is="..."/&gt;. The 'Is' values are: public, protected, internal, protected internal, private II.2.5 &lt;Static/&gt; II.2.6 &lt;Abstract/&gt; II.2.7 &lt;Virtual/&gt; II.2.8 &lt;Override/&gt; II.2.9 &lt;Sealed/&gt; II.2.10 &lt;Readonly/&gt; II.2.11 &lt;ImplementsInterface CLRName="..."/&gt;. The 'CLRName' attribute contains regular expression II.2.12 &lt;HandlesEvent /&gt; --&gt; </code></pre> <p>based on this one, that did not do the trick for me but who deserves the credit: <a href="http://www.clydesdalesoftware.net/blogs/jluif/CommentView,guid,1875594b-0d23-401f-8e22-f1cbf87beefe.aspx" rel="nofollow noreferrer">http://www.clydesdalesoftware.net/blogs/jluif/CommentView,guid,1875594b-0d23-401f-8e22-f1cbf87beefe.aspx</a></p> <p>This is a header snippet that complies to stylecop:</p> <pre><code>// &lt;copyright file="$FileName$" company="$Company$"&gt; // Copyright (c) 2008 All Right Reserved // &lt;/copyright&gt; // &lt;author&gt;$author$&lt;/author&gt; // &lt;email&gt;$email$&lt;/email&gt; // &lt;date&gt;$date$&lt;/date&gt; // &lt;summary&gt;$summary$&lt;/summary&gt; </code></pre> <p>Still not quite there but it is a start.</p> <p>Since this answer the Custom type member layout has been put in the StyleCop for resharper plugin. See <a href="http://1succeeded0failed0skipped.com/blogs/howardvanrooijen/archive/2008/12/07/stylecop-for-resharper-v0-0-14220-released.aspx" rel="nofollow noreferrer">here</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload