Skip to content

Commit

Permalink
Enable alt-rule for not prefixing local calls with this. Ouch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihlus committed Feb 4, 2018
1 parent b630340 commit 3df4a8b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Expand Up @@ -84,7 +84,7 @@ protected override void GenerateImplementation(MethodInfo method, string symbolN
GenerateDelegateInvokerBody(loweredMethod.LoweredMethod, loweredMethod.ParameterTypes, delegateBuilderType, delegateField);
var implementation = GenerateComplexMethodBody(method, loweredMethod.LoweredMethod, loweredMethod.ParameterTypes);

this.TargetType.DefineMethodOverride(implementation, method);
TargetType.DefineMethodOverride(implementation, method);

AugmentHostingTypeConstructor(symbolName, delegateBuilderType, delegateField);
}
Expand Down
Expand Up @@ -68,7 +68,7 @@ protected override void GenerateImplementation(MethodInfo method, string symbolN
TargetType.DefineField($"{uniqueMemberIdentifier}_dt", delegateBuilderType, FieldAttributes.Public);

var implementation = GenerateDelegateInvoker(method, delegateBuilderType, delegateField);
this.TargetType.DefineMethodOverride(implementation, method);
TargetType.DefineMethodOverride(implementation, method);

AugmentHostingTypeConstructor(symbolName, delegateBuilderType, delegateField);
}
Expand Down
Expand Up @@ -209,7 +209,7 @@ private MethodBuilder GeneratePropertySetter
setterIL.Emit(OpCodes.Ret);

propertyBuilder.SetSetMethod(setterMethod);
this.TargetType.DefineMethodOverride(setterMethod, actualSetMethod);
TargetType.DefineMethodOverride(setterMethod, actualSetMethod);

return setterMethod;
}
Expand Down Expand Up @@ -282,7 +282,7 @@ private MethodBuilder GeneratePropertyGetter
getterIL.Emit(OpCodes.Ret);

propertyBuilder.SetGetMethod(getterMethod);
this.TargetType.DefineMethodOverride(getterMethod, actualGetMethod);
TargetType.DefineMethodOverride(getterMethod, actualGetMethod);

return getterMethod;
}
Expand Down
2 changes: 1 addition & 1 deletion stylecop.ruleset
Expand Up @@ -39,7 +39,7 @@
<!-- Readability rules -->
<Rule Id="SA1100" Action="Error" /> <!-- Do not prefix calls with base unless local implementation exists -->
<Rule Id="SA1101" Action="None"/> <!-- Prefix local calls with this -->
<Rule Id="SX1101" Action="None" Intentional="true" /> <!-- Do not prefix local calls with this. -->
<Rule Id="SX1101" Action="Error" Intentional="true" /> <!-- Do not prefix local calls with this. -->
<Rule Id="SA1102" Action="Error" /> <!-- Query clause must follow previous clause -->
<Rule Id="SA1103" Action="Error" /> <!-- Query clauses must be on separate lines or all on one line -->
<Rule Id="SA1104" Action="Error" /> <!-- Query clause must begin on new line when previous clause spans multiple lines -->
Expand Down

0 comments on commit 3df4a8b

Please sign in to comment.