diff --git a/RefactoringEssentials/CSharp/CodeRefactorings/Synced/AddNewFormatItemCodeRefactoringProvider.cs b/RefactoringEssentials/CSharp/CodeRefactorings/Synced/AddNewFormatItemCodeRefactoringProvider.cs
index 783555de..53f99e49 100644
--- a/RefactoringEssentials/CSharp/CodeRefactorings/Synced/AddNewFormatItemCodeRefactoringProvider.cs
+++ b/RefactoringEssentials/CSharp/CodeRefactorings/Synced/AddNewFormatItemCodeRefactoringProvider.cs
@@ -11,7 +11,7 @@ namespace RefactoringEssentials.CSharp.CodeRefactorings
{
///
/// Introduce format item. Works on strings that contain selections.
- /// "this is string" => string.Format ("this is {0} string", )
+ /// "this is <some> string" => string.Format ("this is {0} string", <some>)
///
[ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = "Introduce format item")]
diff --git a/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ContractEnsuresNotNullReturnRefactoringProvider.cs b/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ContractEnsuresNotNullReturnRefactoringProvider.cs
index 546e67e4..1ca4fe84 100644
--- a/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ContractEnsuresNotNullReturnRefactoringProvider.cs
+++ b/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ContractEnsuresNotNullReturnRefactoringProvider.cs
@@ -11,10 +11,10 @@
namespace RefactoringEssentials.CSharp.CodeRefactorings
{
- [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = "Add a Contract to specify the return value must not be null")]
///
/// Creates a 'Contract.Ensures(return != null);' contract for a method return value.
///
+ [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = "Add a Contract to specify the return value must not be null")]
public class ContractEnsuresNotNullReturnCodeRefactoringProvider : CodeContractsCodeRefactoringProvider
{
#region ICodeActionProvider implementation
diff --git a/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ContractRequiresNotNullCodeRefactoringProvider.cs b/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ContractRequiresNotNullCodeRefactoringProvider.cs
index 1167f9b5..3fe7edee 100644
--- a/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ContractRequiresNotNullCodeRefactoringProvider.cs
+++ b/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ContractRequiresNotNullCodeRefactoringProvider.cs
@@ -12,10 +12,10 @@
namespace RefactoringEssentials.CSharp.CodeRefactorings
{
- [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = "Add a Contract to specify the parameter must not be null")]
///
/// Creates a 'Contract.Requires(param != null);' contract for a parameter.
///
+ [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = "Add a Contract to specify the parameter must not be null")]
public class ContractRequiresNotNullCodeRefactoringProvider : CodeContractsCodeRefactoringProvider
{
#region ICodeActionProvider implementation
diff --git a/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ConvertEqualityOperatorToEqualsCodeRefactoringProvider.cs b/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ConvertEqualityOperatorToEqualsCodeRefactoringProvider.cs
index eb86e7ab..8abd4d03 100644
--- a/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ConvertEqualityOperatorToEqualsCodeRefactoringProvider.cs
+++ b/RefactoringEssentials/CSharp/CodeRefactorings/Synced/ConvertEqualityOperatorToEqualsCodeRefactoringProvider.cs
@@ -9,11 +9,11 @@
namespace RefactoringEssentials.CSharp.CodeRefactorings
{
- [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = "Convert '==' to 'object.Equals()'")]
///
/// Convert do...while to while. For instance, { do x++; while (Foo(x)); } becomes { while(Foo(x)) x++; }.
/// Note that this action will often change the semantics of the code.
///
+ [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = "Convert '==' to 'object.Equals()'")]
public class ConvertEqualityOperatorToEqualsCodeRefactoringProvider : CodeRefactoringProvider
{
public override async Task ComputeRefactoringsAsync(CodeRefactoringContext context)
diff --git a/RefactoringEssentials/CSharp/CodeRefactorings/Uncategorized/ChangeAccessModifierAction.cs b/RefactoringEssentials/CSharp/CodeRefactorings/Uncategorized/ChangeAccessModifierAction.cs
index b5ccf607..f5f16076 100644
--- a/RefactoringEssentials/CSharp/CodeRefactorings/Uncategorized/ChangeAccessModifierAction.cs
+++ b/RefactoringEssentials/CSharp/CodeRefactorings/Uncategorized/ChangeAccessModifierAction.cs
@@ -10,10 +10,10 @@
namespace RefactoringEssentials.CSharp.CodeRefactorings
{
- [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = "Change access level")]
///
/// Changes the access level of an entity declaration
///
+ [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = "Change access level")]
public class ChangeAccessModifierAction : CodeRefactoringProvider
{
public override async Task ComputeRefactoringsAsync(CodeRefactoringContext context)
diff --git a/RefactoringEssentials/CSharp/CodeRefactorings/Uncategorized/ExtractAnonymousMethodCodeRefactoringProvider.cs b/RefactoringEssentials/CSharp/CodeRefactorings/Uncategorized/ExtractAnonymousMethodCodeRefactoringProvider.cs
index 3d53fab1..0366fb49 100644
--- a/RefactoringEssentials/CSharp/CodeRefactorings/Uncategorized/ExtractAnonymousMethodCodeRefactoringProvider.cs
+++ b/RefactoringEssentials/CSharp/CodeRefactorings/Uncategorized/ExtractAnonymousMethodCodeRefactoringProvider.cs
@@ -48,7 +48,6 @@ public IEnumerable GetActions(Document document, SemanticModel model
if (lambdaSymbol == null)
yield break;
- bool noReturn = false;
BlockSyntax body;
if (lambdaExpression.Body is BlockSyntax)
{
diff --git a/RefactoringEssentials/CSharp/Diagnostics/Custom/AvoidAsyncVoidAnalyzer.cs b/RefactoringEssentials/CSharp/Diagnostics/Custom/AvoidAsyncVoidAnalyzer.cs
index 7faeb2fd..e44230b2 100644
--- a/RefactoringEssentials/CSharp/Diagnostics/Custom/AvoidAsyncVoidAnalyzer.cs
+++ b/RefactoringEssentials/CSharp/Diagnostics/Custom/AvoidAsyncVoidAnalyzer.cs
@@ -8,9 +8,6 @@
namespace RefactoringEssentials.CSharp.Diagnostics.Custom
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
- ///
- ///
- ///
public class AvoidAsyncVoidAnalyzer : DiagnosticAnalyzer
{
static readonly DiagnosticDescriptor descriptor = new DiagnosticDescriptor(
diff --git a/RefactoringEssentials/CSharp/Diagnostics/Custom/RedundantInternalAnalyzer.cs b/RefactoringEssentials/CSharp/Diagnostics/Custom/RedundantInternalAnalyzer.cs
index 070a9078..49f66dec 100644
--- a/RefactoringEssentials/CSharp/Diagnostics/Custom/RedundantInternalAnalyzer.cs
+++ b/RefactoringEssentials/CSharp/Diagnostics/Custom/RedundantInternalAnalyzer.cs
@@ -7,10 +7,10 @@
namespace RefactoringEssentials.CSharp.Diagnostics
{
- [DiagnosticAnalyzer(LanguageNames.CSharp)]
///
/// Finds redundant internal modifiers.
///
+ [DiagnosticAnalyzer(LanguageNames.CSharp)]
public class RedundantInternalAnalyzer : DiagnosticAnalyzer
{
static readonly DiagnosticDescriptor descriptor = new DiagnosticDescriptor(
diff --git a/RefactoringEssentials/CSharp/Diagnostics/Custom/RedundantPrivateAnalyzer.cs b/RefactoringEssentials/CSharp/Diagnostics/Custom/RedundantPrivateAnalyzer.cs
index 78742818..ef71c5ba 100644
--- a/RefactoringEssentials/CSharp/Diagnostics/Custom/RedundantPrivateAnalyzer.cs
+++ b/RefactoringEssentials/CSharp/Diagnostics/Custom/RedundantPrivateAnalyzer.cs
@@ -7,10 +7,10 @@
namespace RefactoringEssentials.CSharp.Diagnostics
{
- [DiagnosticAnalyzer(LanguageNames.CSharp)]
///
/// Finds redundant internal modifiers.
///
+ [DiagnosticAnalyzer(LanguageNames.CSharp)]
public class RedundantPrivateAnalyzer : DiagnosticAnalyzer
{
static readonly DiagnosticDescriptor descriptor = new DiagnosticDescriptor(
diff --git a/RefactoringEssentials/CSharp/Diagnostics/Custom/RoslynUsageAnalyzer.cs b/RefactoringEssentials/CSharp/Diagnostics/Custom/RoslynUsageAnalyzer.cs
index 16187b9e..96377aff 100644
--- a/RefactoringEssentials/CSharp/Diagnostics/Custom/RoslynUsageAnalyzer.cs
+++ b/RefactoringEssentials/CSharp/Diagnostics/Custom/RoslynUsageAnalyzer.cs
@@ -12,7 +12,9 @@ namespace RefactoringEssentials.CSharp
{
// Disabled for now to avoid exceptions in compiler-only case, because this analyzer requires types from Roslyn's Workspaces layer.
//[DiagnosticAnalyzer(LanguageNames.CSharp)]
+ #pragma warning disable RS1001 // missing DiagnosticAnalyzerAttribute
public class RoslynUsageAnalyzer : DiagnosticAnalyzer
+ #pragma warning restore RS1001
{
static readonly DiagnosticDescriptor descriptor = new DiagnosticDescriptor(
CSharpDiagnosticIDs.RoslynReflectionUsageAnalyzerID,
diff --git a/RefactoringEssentials/CSharp/Diagnostics/Synced/ConstraintViolations/InconsistentNaming/NamingRule.cs b/RefactoringEssentials/CSharp/Diagnostics/Synced/ConstraintViolations/InconsistentNaming/NamingRule.cs
index 352b4753..2a0c99d4 100644
--- a/RefactoringEssentials/CSharp/Diagnostics/Synced/ConstraintViolations/InconsistentNaming/NamingRule.cs
+++ b/RefactoringEssentials/CSharp/Diagnostics/Synced/ConstraintViolations/InconsistentNaming/NamingRule.cs
@@ -32,7 +32,7 @@ public class NamingRule : IEquatable
///
/// If set, identifiers cannot be suffixed by with any of these values.
- ///
public string[] ForbiddenSuffixes { get; set; }
///
diff --git a/RefactoringEssentials/CSharp/Diagnostics/Synced/Opportunities/ConvertConditionalTernaryToNullCoalescingAnalyzer.cs b/RefactoringEssentials/CSharp/Diagnostics/Synced/Opportunities/ConvertConditionalTernaryToNullCoalescingAnalyzer.cs
index 025a0d90..3bb2df34 100644
--- a/RefactoringEssentials/CSharp/Diagnostics/Synced/Opportunities/ConvertConditionalTernaryToNullCoalescingAnalyzer.cs
+++ b/RefactoringEssentials/CSharp/Diagnostics/Synced/Opportunities/ConvertConditionalTernaryToNullCoalescingAnalyzer.cs
@@ -8,8 +8,8 @@
namespace RefactoringEssentials.CSharp.Diagnostics
{
///
- /// Checks for "a != null ? a : other"
- /// Converts to: "a ?? other"
+ /// Checks for "a != null ? a : other"<expr>
+ /// Converts to: "a ?? other"<expr>
///
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class ConvertConditionalTernaryToNullCoalescingAnalyzer : DiagnosticAnalyzer
diff --git a/RefactoringEssentials/CSharp/Diagnostics/Synced/PracticesAndImprovements/ReplaceWithStringIsNullOrEmptyAnalyzer.cs b/RefactoringEssentials/CSharp/Diagnostics/Synced/PracticesAndImprovements/ReplaceWithStringIsNullOrEmptyAnalyzer.cs
index 6d18b066..9c79dbc3 100644
--- a/RefactoringEssentials/CSharp/Diagnostics/Synced/PracticesAndImprovements/ReplaceWithStringIsNullOrEmptyAnalyzer.cs
+++ b/RefactoringEssentials/CSharp/Diagnostics/Synced/PracticesAndImprovements/ReplaceWithStringIsNullOrEmptyAnalyzer.cs
@@ -201,6 +201,7 @@ static ShouldReplaceResult ShouldReplace(SyntaxNodeAnalysisContext nodeContext,
///
/// Determine whether a binary expression with a string expression is suitable for replacement.
///
+ /// Context for the expressions.
/// A node representing a string expression.
/// A node to be tested.
/// The operator separating the nodes.
@@ -334,8 +335,8 @@ static bool IsNullSyntax(SyntaxNodeAnalysisContext nodeContext, ExpressionSyntax
///
/// Does the expression look like a test for empty string ("" or string.Empty)?
///
+ /// Context for the expressions.
///
- ///
static bool IsEmptySyntax(SyntaxNodeAnalysisContext nodeContext, ExpressionSyntax node)
{
if (!IsStringType(nodeContext, node))
diff --git a/RefactoringEssentials/RefactoringEssentials.csproj b/RefactoringEssentials/RefactoringEssentials.csproj
index 720428e0..b2a144a8 100644
--- a/RefactoringEssentials/RefactoringEssentials.csproj
+++ b/RefactoringEssentials/RefactoringEssentials.csproj
@@ -13,6 +13,7 @@
5.6.0.0
5.6.0
RefactoringEssentials
+ $(DefaultItemExcludes);Samples\**\*
TRACE;DEBUG;NETSTANDARD1_3;NETSTANDARD1_3
diff --git a/RefactoringEssentials/Util/ExpressionSyntaxExtensions.cs b/RefactoringEssentials/Util/ExpressionSyntaxExtensions.cs
index fab5d79d..c66f7cc4 100644
--- a/RefactoringEssentials/Util/ExpressionSyntaxExtensions.cs
+++ b/RefactoringEssentials/Util/ExpressionSyntaxExtensions.cs
@@ -11,6 +11,7 @@
using Microsoft.CodeAnalysis;
using System.Reflection;
using System.Runtime.ExceptionServices;
+using Microsoft.CodeAnalysis.CodeStyle;
namespace RefactoringEssentials
{
@@ -762,14 +763,14 @@ private static bool PreferPredefinedTypeKeywordInDeclarations(NameSyntax name, O
{
return (name.Parent != null) && !(name.Parent is MemberAccessExpressionSyntax) &&
!InsideCrefReference(name) && !InsideNameOfExpression(name, semanticModel) &&
- optionSet.GetOption(SimplificationOptions.PreferIntrinsicPredefinedTypeKeywordInDeclaration, LanguageNames.CSharp);
+ optionSet.GetOption(CodeStyleOptions.PreferIntrinsicPredefinedTypeKeywordInDeclaration, LanguageNames.CSharp).Value;
}
private static bool PreferPredefinedTypeKeywordInMemberAccess(ExpressionSyntax memberAccess, OptionSet optionSet, SemanticModel semanticModel)
{
return (((memberAccess.Parent != null) && (memberAccess.Parent is MemberAccessExpressionSyntax)) || InsideCrefReference(memberAccess)) &&
!InsideNameOfExpression(memberAccess, semanticModel) &&
- optionSet.GetOption(SimplificationOptions.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, LanguageNames.CSharp);
+ optionSet.GetOption(CodeStyleOptions.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, LanguageNames.CSharp).Value;
}
public static bool IsAliasReplaceableExpression(this ExpressionSyntax expression)
diff --git a/RefactoringEssentials/Util/SyntaxTokenExtensions.cs b/RefactoringEssentials/Util/SyntaxTokenExtensions.cs
index 13999946..c9f43dd1 100644
--- a/RefactoringEssentials/Util/SyntaxTokenExtensions.cs
+++ b/RefactoringEssentials/Util/SyntaxTokenExtensions.cs
@@ -1019,7 +1019,7 @@ public static bool TryParseGenericName(this SyntaxToken genericIdentifier, Cance
/// The "name" of the generic identifier, last token before
/// the "&"
/// The last token in the name
- /// This is related to the code in
+ /// This is related to the code in SyntaxTreeExtensions.IsInPartiallyWrittenGeneric(SyntaxTree, int, CancellationToken)
public static SyntaxToken FindLastTokenOfPartialGenericName(this SyntaxToken genericIdentifier)
{
//Contract.ThrowIfFalse(genericIdentifier.Kind() == SyntaxKind.IdentifierToken);
diff --git a/RefactoringEssentials/Util/TypeExtensions.cs b/RefactoringEssentials/Util/TypeExtensions.cs
index 926a4817..46e2a889 100644
--- a/RefactoringEssentials/Util/TypeExtensions.cs
+++ b/RefactoringEssentials/Util/TypeExtensions.cs
@@ -110,6 +110,7 @@ public static ITypeSymbol GetNullableUnderlyingType(this ITypeSymbol type)
///
/// The all base classes.
/// Type.
+ /// Whether to include the type as well as its base types.
public static IEnumerable GetAllBaseClasses(this INamedTypeSymbol type, bool includeSuperType = false)
{
if (!includeSuperType)
@@ -126,6 +127,7 @@ public static IEnumerable GetAllBaseClasses(this INamedTypeSym
///
/// All classes and interfaces.
/// Type.
+ /// Whether to include the type as well as its base types.
public static IEnumerable GetAllBaseClassesAndInterfaces(this INamedTypeSymbol type, bool includeSuperType = false)
{
if (!includeSuperType)
diff --git a/RefactoringEssentials/Util/ValueTuple`2.cs b/RefactoringEssentials/Util/ValueTuple`2.cs
index 9bd9d57f..db8d54b7 100644
--- a/RefactoringEssentials/Util/ValueTuple`2.cs
+++ b/RefactoringEssentials/Util/ValueTuple`2.cs
@@ -188,200 +188,12 @@ internal static int CombineValues(IEnumerable values, StringComparer str
return hashCode;
}
- ///
- /// The offset bias value used in the FNV-1a algorithm
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- ///
- //internal const int FnvOffsetBias = unchecked((int)2166136261);
-
///
/// The generative factor used in the FNV-1a algorithm
/// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
///
internal const int FnvPrime = 16777619;
- ///
- /// Compute the FNV-1a hash of a sequence of bytes
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- ///
- /// The sequence of bytes
- /// The FNV-1a hash of
- //internal static int GetFNVHashCode(byte[] data)
- //{
- // int hashCode = Hash.FnvOffsetBias;
-
- // for (int i = 0; i < data.Length; i++)
- // {
- // hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
- // }
-
- // return hashCode;
- //}
-
- ///
- /// Compute the FNV-1a hash of a sequence of bytes and determines if the byte
- /// sequence is valid ASCII and hence the hash code matches a char sequence
- /// encoding the same text.
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- ///
- /// The sequence of bytes that are likely to be ASCII text.
- /// The length of the sequence.
- /// True if the sequence contains only characters in the ASCII range.
- /// The FNV-1a hash of
- //internal static unsafe int GetFNVHashCode(byte* data, int length, out bool isAscii)
- //{
- // int hashCode = Hash.FnvOffsetBias;
-
- // byte asciiMask = 0;
-
- // for (int i = 0; i < length; i++)
- // {
- // byte b = data[i];
- // asciiMask |= b;
- // hashCode = unchecked((hashCode ^ b) * Hash.FnvPrime);
- // }
-
- // isAscii = (asciiMask & 0x80) == 0;
- // return hashCode;
- //}
-
- ///
- /// Compute the FNV-1a hash of a sequence of bytes
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- ///
- /// The sequence of bytes
- /// The FNV-1a hash of
- //internal static int GetFNVHashCode(ImmutableArray data)
- //{
- // int hashCode = Hash.FnvOffsetBias;
-
- // for (int i = 0; i < data.Length; i++)
- // {
- // hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
- // }
-
- // return hashCode;
- //}
-
- ///
- /// Compute the hashcode of a sub-string using FNV-1a
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- /// Note: FNV-1a was developed and tuned for 8-bit sequences. We're using it here
- /// for 16-bit Unicode chars on the understanding that the majority of chars will
- /// fit into 8-bits and, therefore, the algorithm will retain its desirable traits
- /// for generating hash codes.
- ///
- /// The input string
- /// The start index of the first character to hash
- /// The number of characters, beginning with to hash
- /// The FNV-1a hash code of the substring beginning at and ending after characters.
- //internal static int GetFNVHashCode(string text, int start, int length)
- //{
- // int hashCode = Hash.FnvOffsetBias;
- // int end = start + length;
-
- // for (int i = start; i < end; i++)
- // {
- // hashCode = unchecked((hashCode ^ text[i]) * Hash.FnvPrime);
- // }
-
- // return hashCode;
- //}
-
- ///
- /// Compute the hashcode of a sub-string using FNV-1a
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- ///
- /// The input string
- /// The start index of the first character to hash
- /// The FNV-1a hash code of the substring beginning at and ending at the end of the string.
- //internal static int GetFNVHashCode(string text, int start)
- //{
- // return GetFNVHashCode(text, start, length: text.Length - start);
- //}
-
- ///
- /// Compute the hashcode of a string using FNV-1a
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- ///
- /// The input string
- /// The FNV-1a hash code of
- //internal static int GetFNVHashCode(string text)
- //{
- // return CombineFNVHash(Hash.FnvOffsetBias, text);
- //}
-
- ///
- /// Compute the hashcode of a string using FNV-1a
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- ///
- /// The input string
- /// The FNV-1a hash code of
- //internal static int GetFNVHashCode(System.Text.StringBuilder text)
- //{
- // int hashCode = Hash.FnvOffsetBias;
- // int end = text.Length;
-
- // for (int i = 0; i < end; i++)
- // {
- // hashCode = unchecked((hashCode ^ text[i]) * Hash.FnvPrime);
- // }
-
- // return hashCode;
- //}
-
- ///
- /// Compute the hashcode of a sub string using FNV-1a
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- ///
- /// The input string as a char array
- /// The start index of the first character to hash
- /// The number of characters, beginning with to hash
- /// The FNV-1a hash code of the substring beginning at and ending after characters.
- //internal static int GetFNVHashCode(char[] text, int start, int length)
- //{
- // int hashCode = Hash.FnvOffsetBias;
- // int end = start + length;
-
- // for (int i = start; i < end; i++)
- // {
- // hashCode = unchecked((hashCode ^ text[i]) * Hash.FnvPrime);
- // }
-
- // return hashCode;
- //}
-
- ///
- /// Compute the hashcode of a single character using the FNV-1a algorithm
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- /// Note: In general, this isn't any more useful than "char.GetHashCode". However,
- /// it may be needed if you need to generate the same hash code as a string or
- /// substring with just a single character.
- ///
- /// The character to hash
- /// The FNV-1a hash code of the character.
- //internal static int GetFNVHashCode(char ch)
- //{
- // return Hash.CombineFNVHash(Hash.FnvOffsetBias, ch);
- //}
-
- ///
- /// Combine a string with an existing FNV-1a hash code
- /// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
- ///
- /// The accumulated hash code
- /// The string to combine
- /// The result of combining with using the FNV-1a algorithm
- //internal static int CombineFNVHash(int hashCode, string text)
- //{
- // foreach (char ch in text)
- // {
- // hashCode = unchecked((hashCode ^ ch) * Hash.FnvPrime);
- // }
-
- // return hashCode;
- //}
-
///
/// Combine a char with an existing FNV-1a hash code
/// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
diff --git a/RefactoringEssentials/VB/CodeRefactorings/CheckIfParameterIsNothingCodeRefactoringProvider.cs b/RefactoringEssentials/VB/CodeRefactorings/CheckIfParameterIsNothingCodeRefactoringProvider.cs
index b5e29e95..c0536ad9 100644
--- a/RefactoringEssentials/VB/CodeRefactorings/CheckIfParameterIsNothingCodeRefactoringProvider.cs
+++ b/RefactoringEssentials/VB/CodeRefactorings/CheckIfParameterIsNothingCodeRefactoringProvider.cs
@@ -14,10 +14,10 @@
namespace RefactoringEssentials.VB.CodeRefactorings
{
- [ExportCodeRefactoringProvider(LanguageNames.VisualBasic, Name = "Check if parameter is Nothing")]
///
/// Creates a 'If param Is Nothing Then Throw New System.ArgumentNullException();' contruct for a parameter.
///
+ [ExportCodeRefactoringProvider(LanguageNames.VisualBasic, Name = "Check if parameter is Nothing")]
public class CheckIfParameterIsNothingCodeRefactoringProvider : SpecializedCodeRefactoringProvider
{
protected override IEnumerable GetActions(Document document, SemanticModel semanticModel, SyntaxNode root, TextSpan span, ParameterSyntax node, CancellationToken cancellationToken)
diff --git a/RefactoringEssentials/VB/CodeRefactorings/ConvertDecToHexCodeRefactoringProvider.cs b/RefactoringEssentials/VB/CodeRefactorings/ConvertDecToHexCodeRefactoringProvider.cs
index a0611ed9..da9f2cf9 100644
--- a/RefactoringEssentials/VB/CodeRefactorings/ConvertDecToHexCodeRefactoringProvider.cs
+++ b/RefactoringEssentials/VB/CodeRefactorings/ConvertDecToHexCodeRefactoringProvider.cs
@@ -7,7 +7,7 @@
namespace RefactoringEssentials.VB.CodeRefactorings
{
///
- /// Convert a dec numer to hex. For example: 16 -> &H10
+ /// Convert a dec numer to hex. For example: 16 -> &H10
///
[ExportCodeRefactoringProvider(LanguageNames.VisualBasic, Name = "Convert dec to hex.")]
diff --git a/RefactoringEssentials/VB/CodeRefactorings/ConvertHexToDecCodeRefactoringProvider.cs b/RefactoringEssentials/VB/CodeRefactorings/ConvertHexToDecCodeRefactoringProvider.cs
index 0e61266d..fdfa1318 100644
--- a/RefactoringEssentials/VB/CodeRefactorings/ConvertHexToDecCodeRefactoringProvider.cs
+++ b/RefactoringEssentials/VB/CodeRefactorings/ConvertHexToDecCodeRefactoringProvider.cs
@@ -8,7 +8,7 @@
namespace RefactoringEssentials.VB.CodeRefactorings
{
///
- /// Convert a hex numer to dec. For example: &H10 -> 16
+ /// Convert a hex numer to dec. For example: &H10 -> 16
///
[ExportCodeRefactoringProvider(LanguageNames.VisualBasic, Name = "Convert hex to dec.")]