Skip to content

Commit af75f13

Browse files
committed
fix minor typos. update code skipped by conditional compilation. make resource access class for netcore a designer file to be ignored by stylecop. update unit tests to match stylecop rules for monotouch
1 parent f69039b commit af75f13

File tree

64 files changed

+112
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+112
-100
lines changed

source/Unity.Interception/Src/Interceptors/InstanceInterceptors/InterfaceInterception/InterfaceInterceptorClassGenerator.Desktop.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ private static ModuleBuilder GetModuleBuilder()
1111
{
1212
string moduleName = Guid.NewGuid().ToString("N");
1313
#if DEBUG_SAVE_GENERATED_ASSEMBLY
14-
return assemblyBuilder.DefineDynamicModule(moduleName, moduleName + ".dll", true);
14+
return AssemblyBuilder.DefineDynamicModule(moduleName, moduleName + ".dll", true);
1515
#else
1616
return AssemblyBuilder.DefineDynamicModule(moduleName);
1717
#endif

source/Unity.Interception/Src/Interceptors/TypeInterceptors/VirtualMethodInterception/InterceptingClassGeneration/InterceptingClassGenerator.Desktop.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ private static ModuleBuilder GetModuleBuilder()
1111
{
1212
string moduleName = Guid.NewGuid().ToString("N");
1313
#if DEBUG_SAVE_GENERATED_ASSEMBLY
14-
return assemblyBuilder.DefineDynamicModule(moduleName, moduleName + ".dll", true);
14+
return AssemblyBuilder.DefineDynamicModule(moduleName, moduleName + ".dll", true);
1515
#else
1616
return AssemblyBuilder.DefineDynamicModule(moduleName);
1717
#endif

source/Unity/Src/GlobalSuppressions.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,4 @@
33
using System.Diagnostics.CodeAnalysis;
44

55
[assembly: SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames", Justification = "Strong name is supplied in build process.")]
6-
[assembly: SuppressMessage("Microsoft.Usage", "CA2209:AssembliesShouldDeclareMinimumSecurity")]
7-
[assembly: SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors", Scope = "member", Target = "Microsoft.Practices.Unity.UnityContainer..ctor()")]
8-
[assembly: SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors", Scope = "member", Target = "Microsoft.Practices.Unity.UnityContainer..ctor(Microsoft.Practices.Unity.UnityContainer)")]
9-
[assembly: SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Scope = "member", Target = "Microsoft.Practices.Unity.ResolutionFailedException..ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)")]
10-
[assembly: SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope", Scope = "member", Target = "Microsoft.Practices.Unity.UnityContainerBase.RegisterInstance(System.Type,System.Object):Microsoft.Practices.Unity.IUnityContainer")]
11-
[assembly: SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope", Scope = "member", Target = "Microsoft.Practices.Unity.UnityContainerBase.RegisterInstance(System.Type,System.String,System.Object):Microsoft.Practices.Unity.IUnityContainer")]
12-
[assembly: SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Scope = "member", Target = "Microsoft.Practices.Unity.InjectionParameter..ctor(System.Object)")]
136
[assembly: SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "Microsoft.Practices.Unity.StaticFactory", Justification = "As designed")]

source/Unity/Src/ObjectBuilder/RecoveryStack.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.Practices.ObjectBuilder2
1010
/// An implementation of <see cref="IRecoveryStack"/>.
1111
/// </summary>
1212
[SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
13-
Justification = "The name ends in stack becuase the semantics are a stack, and we want that to be obvious to users")]
13+
Justification = "The name ends in stack because the semantics are a stack, and we want that to be obvious to users")]
1414
public class RecoveryStack : IRecoveryStack
1515
{
1616
private Stack<IRequiresRecovery> recoveries = new Stack<IRequiresRecovery>();

source/Unity/Src/ObjectBuilder/Strategies/BuildPlan/DynamicMethod/DynamicBuildPlanGenerationContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public void AddToBuildPlan(Expression expression)
7373
/// <returns></returns>
7474
public Expression CreateParameterExpression(IDependencyResolverPolicy resolver, Type parameterType, Expression setOperationExpression)
7575
{
76-
// The intent of this is to create a parameter resolving expression block. The following
77-
// psuedo code will hopefully make it clearer as to what we're trying to accomplish (of course actual code
76+
// The intent of this is to create a parameter resolving expression block. The following
77+
// pseudo code will hopefully make it clearer as to what we're trying to accomplish (of course actual code
7878
// trumps comments):
7979
// object priorOperation = context.CurrentOperation;
8080
// SetCurrentOperation

source/Unity/Src/RegistrationByConvention/Resources.NetCore.cs renamed to source/Unity/Src/RegistrationByConvention/Resources.NetCore.Designer.cs

Lines changed: 18 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/Unity/Src/RegistrationByConvention/Resources.NetCore.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<#@ import namespace="System.Text" #>
88
<#@ import namespace="System.Text.RegularExpressions" #>
99
<#@ import namespace="System.Collections.Generic" #>
10-
<#@ output extension=".cs" #>
10+
<#@ output extension=".Designer.cs" #>
1111
<#
1212
var resourceFile = this.Host.ResolvePath("strings\\en-US\\Resources.resw");
1313
XDocument document = XDocument.Load(resourceFile);
@@ -37,7 +37,7 @@ namespace <#= suggestedNamespace #>
3737

3838
private static global::Windows.ApplicationModel.Resources.ResourceLoader resourceMan;
3939

40-
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
40+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Using resx generated code as template")]
4141
internal Resources()
4242
{
4343
}

source/Unity/Src/RegistrationByConvention/Unity.RegistrationByConvention.NetCore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<Compile Include="DuplicateTypeMappingException.cs" />
5454
<Compile Include="Properties\AssemblyInfo.cs" />
5555
<Compile Include="RegistrationConvention.cs" />
56-
<Compile Include="Resources.NetCore.cs">
56+
<Compile Include="Resources.NetCore.Designer.cs">
5757
<AutoGen>True</AutoGen>
5858
<DesignTime>True</DesignTime>
5959
<DependentUpon>Resources.NetCore.tt</DependentUpon>
@@ -73,7 +73,7 @@
7373
<None Include="packages.Unity.RegistrationByConvention.NetCore.config" />
7474
<None Include="Resources.NetCore.tt">
7575
<Generator>TextTemplatingFileGenerator</Generator>
76-
<LastGenOutput>Resources.NetCore.cs</LastGenOutput>
76+
<LastGenOutput>Resources.NetCore.Designer.cs</LastGenOutput>
7777
</None>
7878
<PRIResource Include="strings\en-US\Resources.resw" />
7979
</ItemGroup>

source/Unity/Tests/ObjectBuilder/BuildKeyMappingPolicyTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#elif __IOS__
66
using NUnit.Framework;
77
using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
8-
using TestMethodAttribute = NUnit.Framework.TestAttribute;
98
using TestInitializeAttribute = NUnit.Framework.SetUpAttribute;
9+
using TestMethodAttribute = NUnit.Framework.TestAttribute;
1010
#else
1111
using Microsoft.VisualStudio.TestTools.UnitTesting;
1212
#endif

source/Unity/Tests/ObjectBuilder/BuildKeyMappingStrategyTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#elif __IOS__
77
using NUnit.Framework;
88
using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
9-
using TestMethodAttribute = NUnit.Framework.TestAttribute;
109
using TestInitializeAttribute = NUnit.Framework.SetUpAttribute;
10+
using TestMethodAttribute = NUnit.Framework.TestAttribute;
1111
#else
1212
using Microsoft.VisualStudio.TestTools.UnitTesting;
1313
#endif

0 commit comments

Comments
 (0)