Browse Source

threading: style cop

Signed-off-by: Christoph Ruegg <git@cdrnet.ch>
la-knuth
Christoph Ruegg 17 years ago
parent
commit
a388a0ddaa
  1. 28
      src/Managed/Threading/ThreadQueue.cs
  2. 748
      src/Settings.Resharper.xml

28
src/Managed/Threading/ThreadQueue.cs

@ -48,19 +48,19 @@ namespace MathNet.Numerics.Threading
private static readonly object _queueSync = new object(); private static readonly object _queueSync = new object();
/// <summary> /// <summary>
/// Maximum number of jobs that can be in the queue at the same time. /// Queue holding the pending jobs.
/// </summary> /// </summary>
private const int _maximumQueueLength = 1024; private static readonly Queue<Task> _queue = new Queue<Task>();
/// <summary> /// <summary>
/// Counting Semaphore to make the worker thread wait for jobs /// Maximum number of jobs that can be in the queue at the same time.
/// </summary> /// </summary>
private static Semaphore _tasksAvailableSemaphore; private const int MaximumQueueLength = 1024;
/// <summary> /// <summary>
/// Queue holding the pending jobs. /// Counting Semaphore to make the worker thread wait for jobs
/// </summary> /// </summary>
private static readonly Queue<Task> _queue = new Queue<Task>(); private static Semaphore _tasksAvailableSemaphore;
/// <summary> /// <summary>
/// Running flag, used to signal worker threads to stop cleanly. /// Running flag, used to signal worker threads to stop cleanly.
@ -73,12 +73,12 @@ namespace MathNet.Numerics.Threading
private static Thread[] _threads; private static Thread[] _threads;
/// <summary> /// <summary>
/// Number of worked threads. /// Gets the number of worker threads.
/// </summary> /// </summary>
internal static int ThreadCount { get; private set; } internal static int ThreadCount { get; private set; }
/// <summary> /// <summary>
/// Static Constructor /// Initializes static members of the ThreadQueue class.
/// </summary> /// </summary>
static ThreadQueue() static ThreadQueue()
{ {
@ -163,6 +163,10 @@ namespace MathNet.Numerics.Threading
} }
} }
/// <summary>
/// Start or restart the queue with the specified number of worker threads.
/// </summary>
/// <param name="numberOfThreads">Number of worker threads.</param>
internal static void Start(int numberOfThreads) internal static void Start(int numberOfThreads)
{ {
lock (_stateSync) lock (_stateSync)
@ -182,6 +186,9 @@ namespace MathNet.Numerics.Threading
} }
} }
/// <summary>
/// Start the thread queue, if it is not already running.
/// </summary>
internal static void Start() internal static void Start()
{ {
lock (_stateSync) lock (_stateSync)
@ -191,7 +198,7 @@ namespace MathNet.Numerics.Threading
return; return;
} }
_tasksAvailableSemaphore = new Semaphore(_queue.Count, _maximumQueueLength); _tasksAvailableSemaphore = new Semaphore(_queue.Count, MaximumQueueLength);
_running = true; _running = true;
_threads = new Thread[ThreadCount]; _threads = new Thread[ThreadCount];
@ -207,6 +214,9 @@ namespace MathNet.Numerics.Threading
} }
} }
/// <summary>
/// Stop the thread queue, if it is running.
/// </summary>
internal static void Shutdown() internal static void Shutdown()
{ {
lock (_stateSync) lock (_stateSync)

748
src/Settings.Resharper.xml

@ -1,4 +1,747 @@
<CodeStyleSettings> <CodeStyleSettings>
<AgentSmithCSharpStyleSettings version="1">
<CodeStyleSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CustomDictionaries>
<Dictionaries>
<CustomDictionary>
<Name>en-US</Name>
<CaseSensitive>false</CaseSensitive>
<UserWords>Wikipedia
Cholesky
outplace
Inplace
diff
imag</UserWords>
</CustomDictionary>
</Dictionaries>
</CustomDictionaries>
<StringsDictionary>en-US</StringsDictionary>
<IdentifierDictionary>en-US</IdentifierDictionary>
<LastSelectedCustomDictionary>en-US</LastSelectedCustomDictionary>
<CommentsSettings>
<DictionaryName>en-US</DictionaryName>
<CommentMatch>
<Match>
<AccessLevel>Public Protected ProtectedInternal</AccessLevel>
<Declaration>Any</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</CommentMatch>
<CommentNotMatch />
<SuppressIfBaseHasComment>false</SuppressIfBaseHasComment>
<MaxLineLength>80</MaxLineLength>
</CommentsSettings>
<NamingConventionSettings>
<Rules>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Enum</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>EnumerationMember</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches />
<Description>Classes, Enumerations, Enumeration values should be named in Pascal</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Pascal</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Public Internal Protected ProtectedInternal</AccessLevel>
<Declaration>Property</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Public Internal Protected ProtectedInternal</AccessLevel>
<Declaration>Method</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Public Internal Protected ProtectedInternal</AccessLevel>
<Declaration>Event</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches />
<Description>Non private properties, methods, events should be in pascal.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Pascal</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Private</AccessLevel>
<Declaration>Property</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Private</AccessLevel>
<Declaration>Method</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Private</AccessLevel>
<Declaration>Event</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches />
<Description>Private properties, methods, events should be in pascal.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Pascal</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Field</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches />
<Description>Fields should be underscore camel.</Description>
<MustHavePrefixes>
<string>_</string>
</MustHavePrefixes>
<MustNotHavePrefixes>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Camel</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Variable</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Variable should be declared in camel.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Camel</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Parameter</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Function parameters should be in camel.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Camel</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Namespace</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Namespaces should be in Pascal.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Pascal</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>true</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Constant</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Constants should be in capital.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>UpperCase</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Any</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Constant</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</NotMatches>
<Description>Acronyms should not have more than 2 characters.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>MatchesRegex</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
<Regex>^(?&gt;(XML|SQL|[A-Z]{0,2})[A-Z]?([^A-Z]|$)|[^A-Z]+)*$</Regex>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Any</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Constant</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Field</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Private</AccessLevel>
<Declaration>Method</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>None</AccessLevel>
<Declaration>Namespace</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</NotMatches>
<Description>Names should not have underscore character</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>NotMatchesRegex</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
<Regex>(?&lt;remove&gt;_)</Regex>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<MarkedWithAttribute>NUnit.Framework.TestFixtureAttribute</MarkedWithAttribute>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>TestFixtures should end with Test.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>Test</string>
</MustNotHavePrefixes>
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Test</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Method</Declaration>
<MarkedWithAttribute>NUnit.Framework.TestAttribute</MarkedWithAttribute>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Test methods should start with Test.</Description>
<MustHavePrefixes>
<string>Test</string>
</MustHavePrefixes>
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes>
<string>Test</string>
</MustNotHaveSuffixes>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Enum</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Enumerations should not end with Enum.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes>
<string>Enum</string>
</MustNotHaveSuffixes>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>EnumerationMember</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Do not name enumerations reserved.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>NotMatchesRegex</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
<Regex>(?&lt;remove&gt;(reserved|Reserved))</Regex>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Event</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Event should not have Before or After prefix.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>Before</string>
<string>After</string>
</MustNotHavePrefixes>
<Rule>None</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Enum</Declaration>
<MarkedWithAttribute>System.FlagsAttribute</MarkedWithAttribute>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Flags enums should have plural names</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>s</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>true</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Enum</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Enum</Declaration>
<MarkedWithAttribute>System.FlagsAttribute</MarkedWithAttribute>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</NotMatches>
<Description>Enums that are not flags should not have plural names</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes>
<string>s</string>
</MustNotHaveSuffixes>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Attribute</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Attribute should end with Attribute.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Attribute</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.EventArgs</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>EventArgs should end with EventArgs.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>EventArgs</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Exception</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Exceptions should end with Exception.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Exception</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Stack</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Generic.Stack</InheritedFrom>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches />
<Description>Stack should end with Collection or Stack.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Collection</string>
<string>Stack</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.ICollection</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.IEnumerable</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Generic.ICollection</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Stack</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Queue</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Generic.Stack</InheritedFrom>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</NotMatches>
<Description>Collections should end with Collection.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Collection</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.IDictionary</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Generic.IDictionary</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Dictionary should end with Dictionary.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Dictionary</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Queue</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Queue should end with Collection or Queue.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Collection</string>
<string>Queue</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Interface</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Interfaces should be in Pascal and start with I.</Description>
<MustHavePrefixes>
<string>I</string>
</MustHavePrefixes>
<MustNotHavePrefixes />
<Rule>Pascal</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
</Rules>
<Exclusions />
</NamingConventionSettings>
<IdentifiersToSpellCheck>
<Match>
<AccessLevel>Public Protected ProtectedInternal</AccessLevel>
<Declaration>Any</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</IdentifiersToSpellCheck>
<IdentifiersNotToSpellCheck />
<PatternsToIgnore>
<string>(?#email)\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*</string>
<string>(?#url)http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?</string>
</PatternsToIgnore>
</CodeStyleSettings>
</AgentSmithCSharpStyleSettings>
<CSharp> <CSharp>
<FormatSettings> <FormatSettings>
<ANONYMOUS_METHOD_DECLARATION_BRACES>NEXT_LINE</ANONYMOUS_METHOD_DECLARATION_BRACES> <ANONYMOUS_METHOD_DECLARATION_BRACES>NEXT_LINE</ANONYMOUS_METHOD_DECLARATION_BRACES>
@ -61,7 +804,7 @@
<Naming2> <Naming2>
<ExceptionName IsNull="False"> <ExceptionName IsNull="False">
</ExceptionName> </ExceptionName>
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" /> <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="StaticReadonly" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" /> <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
<PredefinedRule Inspect="True" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" /> <PredefinedRule Inspect="True" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />
<PredefinedRule Inspect="True" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" /> <PredefinedRule Inspect="True" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
@ -75,5 +818,8 @@
<PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="NotPublicInstanceFields" /> <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="NotPublicInstanceFields" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" /> <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" /> <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
<Abbreviation Text="QR" />
<Abbreviation Text="FFT" />
<Abbreviation Text="LU" />
</Naming2> </Naming2>
</CodeStyleSettings> </CodeStyleSettings>
Loading…
Cancel
Save