Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Stylecop analysis #1037

Merged
merged 75 commits into from Jun 4, 2018
Merged
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
ebc6053
Enable StyleCop
blairconrad May 11, 2018
be07b6a
Ignore all applicable StyleCop violations
blairconrad May 19, 2018
9ff02e3
Fix SA1505: An opening brace should not be followed by a blank line
blairconrad May 19, 2018
65d3f0e
Fix SA1507: Code should not contain multiple blank lines in a row
blairconrad May 19, 2018
9f9e35b
Fix SA1508: A closing brace should not be preceded by a blank line
zvirja May 24, 2018
9d3ebbc
Fix SA1509: Opening braces should not be preceded by blank line
blairconrad May 20, 2018
9e4d0c6
Fix SA1512: Single-line comments should not be followed by blank line
blairconrad May 20, 2018
7ad21ba
Fix SA1514: Element documentation header should be preceded by blank …
blairconrad May 20, 2018
0adc65d
Fix SA1516: Elements should be separated by blank line
blairconrad May 20, 2018
bdd1adb
Fix SA1518: Code should not contain blank lines at the end of the file
blairconrad May 20, 2018
bf40b40
Fix SA1000: Keywords must be spaced correctly
blairconrad May 20, 2018
871ae71
Fix SA1001: Commas must be spaced correctly
blairconrad May 20, 2018
7e3a60b
Fix SA1002: Semicolons should be followed by a space
blairconrad May 20, 2018
2017be7
Fix SA1003: Symbols must be spaced correctly
blairconrad May 20, 2018
5e819bc
Fix SA1004: Documentation line should begin with a space
blairconrad May 20, 2018
8ec6b6c
Fix SA1005: Single line comment should begin with a space
blairconrad May 20, 2018
351df50
Fix SA1008: Opening parenthesis should not be followed by a space
blairconrad May 20, 2018
14d3fd6
Fix SA1009: Closing parenthesis must be spaced correctly
blairconrad May 20, 2018
77ab40b
Fix SA1011: Closing square bracket should be followed by a space
blairconrad May 20, 2018
5e0825e
Fix SA1012: Opening brace should be followed by a space
blairconrad May 20, 2018
df9a0e9
Fix SA1013: Closing brace should be preceded by a space
blairconrad May 20, 2018
7e32f92
Fix SA1015: Closing generic bracket should be followed by a space
blairconrad May 20, 2018
dc7e1e2
Stop suppressing SA1021: Negative sign should be preceded by a space
blairconrad May 20, 2018
43fcb86
Fix SA1024: Colon should be preceded by a space
blairconrad May 20, 2018
e66acbd
Partially fix SA1025: Code should not contain multiple whitespace cha…
blairconrad May 20, 2018
5c880dd
Fix SA1026: The keyword 'new' should not be followed by a space or a …
blairconrad May 20, 2018
4241421
Fix SA1027: Tabs and spaces should be used correctly
blairconrad May 20, 2018
577f267
Fix SA1028: Code should not contain trailing whitespace
blairconrad May 20, 2018
d17980b
Fix SA1101: Prefix local calls with this
blairconrad May 20, 2018
b088136
Fix SA1106: Code should not contain empty statements
blairconrad May 20, 2018
2667aea
Fix SA1107: Code should not contain multiple statements on one line
blairconrad May 20, 2018
1c71a1f
Fix SA1110: Opening parenthesis or bracket should be on declaration line
blairconrad May 20, 2018
ca0e79a
Stop suppressing SA1111: Closing parenthesis should be on line of las…
blairconrad May 20, 2018
57ff4a9
Fix SA1114: Parameter list should follow declaration
blairconrad May 20, 2018
d596d5d
Fix SA1115: The parameter should begin on the line after the previous…
blairconrad May 20, 2018
a89ae87
Fix SA1119: Statement should not use unnecessary parenthesis
blairconrad May 21, 2018
87ee0b9
Fix SA1121: Use built-in type alias
blairconrad May 21, 2018
09ae115
Fix SA1122: Use string.Empty for empty strings
blairconrad May 21, 2018
02199a9
Fix SA1124: Do not use regions
blairconrad May 21, 2018
6bd92a7
Fix SA1125: Use shorthand for nullable types
blairconrad May 21, 2018
ac497b1
Fix SA1127: Generic type constraints should be on their own line
blairconrad May 21, 2018
b2f462d
Fix SA1128: Put constructor initializers on their own line
blairconrad May 21, 2018
fe5ef91
Fix SA1129: Do not use default value type constructor
blairconrad May 21, 2018
1d78ef3
Fix SA1130: Use lambda syntax
blairconrad May 21, 2018
5200282
Fix SA1131: Constant values should appear on the right-hand side of c…
blairconrad May 21, 2018
1531d2b
Fix SA1133: Each attribute should be placed in its own set of square …
blairconrad May 21, 2018
91aa929
Fix SA1136: Enum values should be on separate lines
blairconrad May 21, 2018
b3a562d
Fix SA1137: Elements should have the same indentation
blairconrad May 21, 2018
3a32c5b
Fix SA1139: Use literal suffix notation instead of casting
blairconrad May 21, 2018
1f0aca6
Fix SA1210: Using directives should be ordered alphabetically by the …
blairconrad May 21, 2018
b3fc332
Fix SA1300: Element must begin with uppercase letter
blairconrad May 21, 2018
73c049b
Fix SA1307: Accessible field should begin with upper-case letter
blairconrad May 22, 2018
d8986f8
Fix SA1309: Field names must not begin with underscore
blairconrad May 22, 2018
05c78ae
SA1310 Field names must not contain an underscore
blairconrad May 22, 2018
77baedc
SA1311: Static readonly fields should begin with upper-case letter
blairconrad May 22, 2018
0572eea
SA1312: Variable names should begin with lower-case letter
blairconrad May 22, 2018
5e7efb0
Fix SA1313: Parameter '_' should begin with lower-case letter
blairconrad May 22, 2018
cff5486
Fix SA1314: Type parameter names should begin with T
blairconrad May 22, 2018
518773a
Fix SA1400: Elements should declare an access modifier
blairconrad May 22, 2018
7020cb2
Fix SA1401: Field should be private
blairconrad May 22, 2018
f649bf9
Fix SA1402: File may only contain a single type
blairconrad May 23, 2018
aaa5e91
Fix SA1404: Code analysis suppression should have justification
blairconrad May 23, 2018
6c08fc4
Fix SA1407: Arithmetic expressions should declare precedence
blairconrad May 23, 2018
42652cd
Fix SA1408: Conditional expressions should declare precedence
blairconrad May 23, 2018
75e17bb
Fix SA1500: Braces for multi-line statements should not share line
blairconrad May 23, 2018
c833833
Fix SA1502: Element should not be on a single line
blairconrad May 23, 2018
e462336
Fix SA1504: All accessors should be single-line or multi-line
blairconrad May 23, 2018
31ee03b
Suppress only in tests SA1515: Single-line comment should be preceded…
blairconrad May 23, 2018
af3dd3b
Fix SA1519: Braces should not be omitted from multi-line child statement
blairconrad May 23, 2018
8399c06
Fix SA1649: File name should match first type name
blairconrad May 23, 2018
1107293
Fix SA0001: XML comment analysis is disabled due to project configura…
zvirja May 24, 2018
6b5ff2e
Fix SA1629: Documentation text should end with a period
zvirja May 24, 2018
2d7a58f
Rename ruleset files to better describe their content
zvirja May 24, 2018
5373c6e
Disable code analysis for non-verification build
zvirja May 26, 2018
349e4c3
Add a diagnostics hint to the validation failure message
zvirja Jun 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion Src/All.sln
Expand Up @@ -60,10 +60,13 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F0A01F00-72C7-4CE4-8BA4-9EB178B72329}"
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
..\Build.fsx = ..\Build.fsx
CodeAnalysis.AutoFixture.ruleset = CodeAnalysis.AutoFixture.ruleset
CodeAnalysis.Empty.ruleset = CodeAnalysis.Empty.ruleset
CodeAnalysis.Test.ruleset = CodeAnalysis.Test.ruleset
Common.props = Common.props
Common.Test.props = Common.Test.props
Common.Test.xUnit.props = Common.Test.xUnit.props
..\Build.fsx = ..\Build.fsx
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoFakeItEasy.FakeItEasy2UnitTest", "AutoFakeItEasy.FakeItEasy2UnitTest\AutoFakeItEasy.FakeItEasy2UnitTest.csproj", "{7F957CC0-79C3-48A1-9A3E-47BED7539248}"
Expand Down
8 changes: 8 additions & 0 deletions Src/All.sln.DotSettings
@@ -1,8 +1,16 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=BuiltInTypeReferenceStyle/@EntryIndexedValue">SUGGESTION</s:String>
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/ReadSettingsFromFileLevel/@EntryValue">True</s:Boolean>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_BEFORE_SINGLE_LINE_COMMENT/@EntryValue">1</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_CODE/@EntryValue">1</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue">1</s:Int64>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_DECLARATION_PARENS_ARRANGEMENT/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSORHOLDER_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_BEFORE_EXTENDS_COLON/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
Expand Down
2 changes: 1 addition & 1 deletion Src/AutoFakeItEasy/AutoFakeItEasyCustomization.cs
Expand Up @@ -10,7 +10,7 @@ namespace AutoFixture.AutoFakeItEasy
/// Enables auto-mocking with FakeItEasy.
/// </summary>
/// <remarks>
/// NOTICE! You can assign the customization properties to tweak the features you would like to enable. Example:
/// NOTICE! You can assign the customization properties to tweak the features you would like to enable. See example.
/// <br />
/// <code>new AutoFakeItEasyCustomization { GenerateDelegates = true }</code>
/// </remarks>
Expand Down
32 changes: 16 additions & 16 deletions Src/AutoFakeItEasy/ConfigureFakeMembersCommand.cs
Expand Up @@ -7,26 +7,26 @@

namespace AutoFixture.AutoFakeItEasy
{
/// <summary>
/// Sets up a Fake's members so that the return, out, and ref values of virtual members will
/// be retrieved from the fixture, instead of being created directly by FakeItEasy.
///
/// This will setup virtual methods and properties.
/// </summary>
/// <remarks>
/// <summary>
/// Sets up a Fake's members so that the return, out, and ref values of virtual members will
/// be retrieved from the fixture, instead of being created directly by FakeItEasy.
///
/// This will setup virtual methods and properties.
/// </summary>
/// <remarks>
/// This will setup any virtual methods and properties.
/// This includes:
/// - interface's methods/properties;
/// - class's abstract/virtual/overridden/non-sealed methods/properties.
/// </remarks>
/// This includes:
/// - interface's methods/properties;
/// - class's abstract/virtual/overridden/non-sealed methods/properties.
/// </remarks>
public class ConfigureFakeMembersCommand : ISpecimenCommand
{
/// <summary>
/// <summary>
/// Sets up a Fake's members so that the return, out, and ref values will be retrieved
/// from the fixture, instead of being created directly by FakeItEasy.
/// </summary>
/// <param name="specimen">The Fake to setup.</param>
/// <param name="context">The context of the Fake.</param>
/// from the fixture, instead of being created directly by FakeItEasy.
/// </summary>
/// <param name="specimen">The Fake to setup.</param>
/// <param name="context">The context of the Fake.</param>
public void Execute(object specimen, ISpecimenContext context)
{
if (context == null) throw new ArgumentNullException(nameof(context));
Expand Down
16 changes: 8 additions & 8 deletions Src/AutoFakeItEasy/FakeItEasyMethodQuery.cs
Expand Up @@ -13,7 +13,7 @@ namespace AutoFixture.AutoFakeItEasy
/// </summary>
public class FakeItEasyMethodQuery : IMethodQuery
{
private static readonly DelegateSpecification delegateSpecification = new DelegateSpecification();
private static readonly DelegateSpecification DelegateSpecification = new DelegateSpecification();

/// <summary>
/// Selects constructors for the supplied type.
Expand All @@ -36,7 +36,7 @@ public IEnumerable<IMethod> SelectMethods(Type type)
}

var fakeType = type.GetFakedType();
if (fakeType.GetTypeInfo().IsInterface || delegateSpecification.IsSatisfiedBy(fakeType))
if (fakeType.GetTypeInfo().IsInterface || DelegateSpecification.IsSatisfiedBy(fakeType))
{
return new[] { new ConstructorMethod(type.GetDefaultConstructor()) };
}
Expand All @@ -53,7 +53,7 @@ private static class FakeMethod
Type type,
IEnumerable<ParameterInfo> parameterInfos)
{
var constructedType =
var constructedType =
typeof(FakeMethod<>).MakeGenericType(type);
return (IMethod)Activator.CreateInstance(
constructedType,
Expand All @@ -74,7 +74,7 @@ public FakeMethod(IEnumerable<ParameterInfo> parameterInfos)

public object Invoke(IEnumerable<object> parameters)
{
var genericFakeType = typeof (Fake<>).MakeGenericType(typeof (T));
var genericFakeType = typeof(Fake<>).MakeGenericType(typeof(T));

foreach (var constructor in genericFakeType.GetConstructors())
{
Expand All @@ -86,7 +86,7 @@ public object Invoke(IEnumerable<object> parameters)

var parameterType = constructorParameterInfos[0].ParameterType;
if (!parameterType.GetTypeInfo().IsGenericType ||
parameterType.GetGenericTypeDefinition() != typeof (Action<>))
parameterType.GetGenericTypeDefinition() != typeof(Action<>))
{
continue;
}
Expand All @@ -100,17 +100,17 @@ public object Invoke(IEnumerable<object> parameters)

var withArgumentsForConstructorMethod = fakeOptionsType.GetMethod(
"WithArgumentsForConstructor",
new[] {typeof (object[])});
new[] { typeof(object[]) });

if (withArgumentsForConstructorMethod == null)
{
continue;
}

Action<object> addConstructorArgumentsToOptionsAction =
options => withArgumentsForConstructorMethod.Invoke(options, new object[] {parameters});
options => withArgumentsForConstructorMethod.Invoke(options, new object[] { parameters });

return constructor.Invoke(new object[] {addConstructorArgumentsToOptionsAction});
return constructor.Invoke(new object[] { addConstructorArgumentsToOptionsAction });
}

return null;
Expand Down
13 changes: 6 additions & 7 deletions Src/AutoFakeItEasy/FakeObjectCall.cs
Expand Up @@ -8,7 +8,7 @@ namespace AutoFixture.AutoFakeItEasy
using System.Globalization;

/// <summary>
/// A bridge class, required because the types representing fake object calls in
/// A bridge class, required because the types representing fake object calls in
/// 1.7.4109.1 (which the .NET Framework version of AutoFixture.AutoFakeItEasy is compiled against)
/// differ from those in 2.0.0+ in ways that prevent us from using them directly.
/// If ever support for FakeItEasy versions below 2.0.0 is dropped, this class may be removed.
Expand All @@ -28,16 +28,15 @@ public FakeObjectCall(IFakeObjectCall wrappedCall)

public MethodInfo Method => this.wrappedCall.Method;

public IEnumerable<object> Arguments => (IEnumerable<object>)InvokeWrappedPropertyGetter(ArgumentsPropertyName);
public IEnumerable<object> Arguments => (IEnumerable<object>)this.InvokeWrappedPropertyGetter(ArgumentsPropertyName);

public void SetReturnValue(object value)
{
InvokeWrappedMethod(SetReturnValueMethodName, value);
this.InvokeWrappedMethod(SetReturnValueMethodName, value);
}

public void SetArgumentValue(int index, object value) =>
InvokeWrappedMethod(SetArgumentValueMethodName, index, value);

this.InvokeWrappedMethod(SetArgumentValueMethodName, index, value);

private object InvokeWrappedPropertyGetter(string propertyName)
{
Expand All @@ -49,7 +48,7 @@ private object InvokeWrappedPropertyGetter(string propertyName)
"Property {0} cannot be found on {1}", propertyName, callType.FullName));
}

return propertyInfo.GetValue(wrappedCall);
return propertyInfo.GetValue(this.wrappedCall);
}

private void InvokeWrappedMethod(string methodName, params object[] parameters)
Expand All @@ -62,7 +61,7 @@ private void InvokeWrappedMethod(string methodName, params object[] parameters)
"Method {0} cannot be found on {1}", methodName, callType.FullName));
}

methodInfo.Invoke(wrappedCall, parameters);
methodInfo.Invoke(this.wrappedCall, parameters);
}
}
}
12 changes: 6 additions & 6 deletions Src/AutoFakeItEasy/GlobalSuppressions.cs
@@ -1,13 +1,13 @@
// This file is used by Code Analysis to maintain SuppressMessage
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in the
// Error List, point to "Suppress Message(s)", and click
// To add a suppression to this file, right-click the message in the
// Error List, point to "Suppress Message(s)", and click
// "In Project Suppression File".
// You do not need to add suppressions to this file manually.

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes",
Scope = "namespace", Target = "AutoFixture.AutoFakeItEasy",
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes",
Scope = "namespace", Target = "AutoFixture.AutoFakeItEasy",
Justification = "This should be a separate assembly because it provides extensions to AutoFixture that are specific to the use of FakeItEasy.")]
8 changes: 4 additions & 4 deletions Src/AutoFakeItEasy/MethodCall.cs
Expand Up @@ -36,15 +36,15 @@ public override int GetHashCode()
unchecked
{
var hashCode = -712421553;
hashCode = hashCode * -1521134295 + this.declaringType.GetHashCode();
hashCode = hashCode * -1521134295 + this.methodName.GetHashCode();
hashCode = (hashCode * -1521134295) + this.declaringType.GetHashCode();
hashCode = (hashCode * -1521134295) + this.methodName.GetHashCode();
foreach (var argument in this.arguments)
{
hashCode = hashCode * -1521134295 + EqualityComparer<object>.Default.GetHashCode(argument);
hashCode = (hashCode * -1521134295) + EqualityComparer<object>.Default.GetHashCode(argument);
}
foreach (var argumentType in this.parameterTypes)
{
hashCode = hashCode * -1521134295 + argumentType.GetHashCode();
hashCode = (hashCode * -1521134295) + argumentType.GetHashCode();
}
return hashCode;
}
Expand Down
3 changes: 2 additions & 1 deletion Src/AutoFakeItEasy/MethodCallResult.cs
Expand Up @@ -15,7 +15,7 @@ public MethodCallResult(object returnValue)
public void ApplyToCall(FakeObjectCall fakeObjectCall)
{
fakeObjectCall.SetReturnValue(this.returnValue);
if (outAndRefValues == null) return;
if (this.outAndRefValues == null) return;

foreach (var positionedValue in this.outAndRefValues)
{
Expand All @@ -36,6 +36,7 @@ public void AddOutOrRefValue(int i, object value)
private class PositionedValue
{
public int Position { get; }

public object Value { get; }

public PositionedValue(int position, object value)
Expand Down
8 changes: 4 additions & 4 deletions Src/AutoFakeItEasy/MethodRule.cs
Expand Up @@ -6,7 +6,7 @@ namespace AutoFixture.AutoFakeItEasy
{
/// <summary>
/// A rule that intercepts method calls. Supplies the return and all out and ref values
/// from the fixture. When a method is called repeatedly with the same arguments, the
/// from the fixture. When a method is called repeatedly with the same arguments, the
/// same return value and out and ref values will be provided.
/// </summary>
internal class MethodRule : IFakeObjectCallRule
Expand Down Expand Up @@ -45,7 +45,7 @@ public void Apply(IInterceptedFakeObjectCall interceptedFakeObjectCall)
if (interceptedFakeObjectCall == null) throw new ArgumentNullException(nameof(interceptedFakeObjectCall));

var fakeObjectCall = new FakeObjectCall(interceptedFakeObjectCall);
var callResult = this.resultSource.GetOrAdd(CreateMethodCall(fakeObjectCall), () => CreateMethodCallResult(fakeObjectCall));
var callResult = this.resultSource.GetOrAdd(CreateMethodCall(fakeObjectCall), () => this.CreateMethodCallResult(fakeObjectCall));
callResult.ApplyToCall(fakeObjectCall);
}

Expand All @@ -57,8 +57,8 @@ private static MethodCall CreateMethodCall(FakeObjectCall fakeCall)

private MethodCallResult CreateMethodCallResult(FakeObjectCall fakeObjectCall)
{
var result = new MethodCallResult(ResolveReturnValue(fakeObjectCall));
AddOutAndRefValues(result, fakeObjectCall);
var result = new MethodCallResult(this.ResolveReturnValue(fakeObjectCall));
this.AddOutAndRefValues(result, fakeObjectCall);
return result;
}

Expand Down
6 changes: 3 additions & 3 deletions Src/AutoFakeItEasy/Properties/AssemblyInfo.cs
Expand Up @@ -3,13 +3,13 @@
using System.Resources;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

Expand Down
4 changes: 2 additions & 2 deletions Src/AutoFakeItEasy/PropertySetterRule.cs
Expand Up @@ -6,7 +6,7 @@
namespace AutoFixture.AutoFakeItEasy
{
/// <summary>
/// A rule that intercepts property setter calls. Values will be saved into a result cache to be
/// A rule that intercepts property setter calls. Values will be saved into a result cache to be
/// provided as the return value from the matching get methods when the latter are called.
/// </summary>
internal class PropertySetterRule : IFakeObjectCallRule
Expand Down Expand Up @@ -37,7 +37,7 @@ public bool IsApplicableTo(IFakeObjectCall fakeObjectCall)

/// <summary>
/// Stores the value provided in the property setter to be returned from later
/// calls to the corresponding getter.
/// calls to the corresponding getter.
/// </summary>
/// <param name="interceptedFakeObjectCall">The call to apply the rule to.</param>
public void Apply(IInterceptedFakeObjectCall interceptedFakeObjectCall)
Expand Down
2 changes: 1 addition & 1 deletion Src/AutoFakeItEasy2/FakeItEasyMethodQuery.cs
Expand Up @@ -52,7 +52,7 @@ private static class FakeMethod
Type type,
IEnumerable<ParameterInfo> parameterInfos)
{
var constructedType =
var constructedType =
typeof(FakeMethod<>).MakeGenericType(type);
return (IMethod)Activator.CreateInstance(
constructedType,
Expand Down
4 changes: 2 additions & 2 deletions Src/AutoFakeItEasy2/FakeItEasyType.cs
Expand Up @@ -10,10 +10,10 @@ internal static class FakeItEasyType
{
internal static bool IsFake(this Type type)
{
return (type != null
return type != null
&& type.IsGenericType
&& typeof(Fake<>).IsAssignableFrom(type.GetGenericTypeDefinition())
&& !type.GetFakedType().IsGenericParameter);
&& !type.GetFakedType().IsGenericParameter;
}

internal static ConstructorInfo GetDefaultConstructor(this Type type)
Expand Down
8 changes: 4 additions & 4 deletions Src/AutoFakeItEasy2/GlobalSuppressions.cs
@@ -1,10 +1,10 @@
// This file is used by Code Analysis to maintain SuppressMessage
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in the
// Error List, point to "Suppress Message(s)", and click
// To add a suppression to this file, right-click the message in the
// Error List, point to "Suppress Message(s)", and click
// "In Project Suppression File".
// You do not need to add suppressions to this file manually.

Expand Down
6 changes: 3 additions & 3 deletions Src/AutoFakeItEasy2/Properties/AssemblyInfo.cs
Expand Up @@ -3,13 +3,13 @@
using System.Resources;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

Expand Down