File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "cSpell.words" : [
3- " Xunit"
3+ " autofac" ,
4+ " xunit"
45 ],
56 "omnisharp.enableEditorConfigSupport" : true
67}
Original file line number Diff line number Diff line change 22<Project DefaultTargets =" All" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion =" Current" >
33 <PropertyGroup >
44 <!-- Increment the overall semantic version here. -->
5- <Version >6.1.2 </Version >
5+ <Version >7.0.0 </Version >
66 <SolutionName >Autofac.Extras.AggregateService</SolutionName >
77 <Configuration Condition =" '$(Configuration)'==''" >Release</Configuration >
88 <ArtifactDirectory >$([System.IO.Path]::Combine($(MSBuildProjectDirectory),"artifacts"))</ArtifactDirectory >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22 <PropertyGroup >
33 <Description >Dynamic aggregate service implementation generation for Autofac.</Description >
4- <TargetFrameworks >netstandard2 .0;netstandard2.1</TargetFrameworks >
4+ <TargetFrameworks >net10 .0;net8.0; netstandard2.1;netstandard2.0 </TargetFrameworks >
55 <LangVersion >latest</LangVersion >
66 <Nullable >enable</Nullable >
77 <TreatWarningsAsErrors >true</TreatWarningsAsErrors >
4040 <AdditionalFiles Include =" ../../build/stylecop.json" Link =" stylecop.json" />
4141 </ItemGroup >
4242 <ItemGroup >
43- <PackageReference Include =" Autofac" Version =" 6.0.0" />
44- <PackageReference Include =" Castle.Core" Version =" 4.4.1" />
45- <PackageReference Include =" Microsoft.CodeAnalysis.Analyzers" Version =" 3.3.2" >
46- <PrivateAssets >all</PrivateAssets >
47- </PackageReference >
48- <PackageReference Include =" Microsoft.CodeAnalysis.NetAnalyzers" Version =" 5.0.3" >
49- <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
50- <PrivateAssets >all</PrivateAssets >
51- </PackageReference >
52- <PackageReference Include =" Microsoft.SourceLink.GitHub" Version =" 1.0.0" Condition =" Exists('$(MSBuildThisFileDirectory)../../.git')" >
43+ <PackageReference Include =" Autofac" Version =" 9.1.0" />
44+ <PackageReference Include =" Castle.Core" Version =" 5.2.1" />
45+ <PackageReference Include =" Microsoft.SourceLink.GitHub" Version =" 10.0.300" Condition =" Exists('$(MSBuildThisFileDirectory)../../.git')" >
5346 <PrivateAssets >All</PrivateAssets >
5447 </PackageReference >
55- <PackageReference Include =" StyleCop.Analyzers" Version =" 1.2.0-beta.354 " >
48+ <PackageReference Include =" StyleCop.Analyzers" Version =" 1.2.0-beta.556 " >
5649 <PrivateAssets >all</PrivateAssets >
5750 </PackageReference >
5851 </ItemGroup >
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public void Intercept(IInvocation invocation)
6464 }
6565
6666 return method
67- . DeclaringType
67+ . DeclaringType ?
6868 . GetProperties ( )
6969 . Where ( prop => prop . GetGetMethod ( ) == method )
7070 . FirstOrDefault ( ) ;
@@ -159,7 +159,8 @@ private Dictionary<MethodInfo, Action<IInvocation>> SetupInvocationMap(Type inte
159159 }
160160
161161 // Methods without parameters
162- var methodWithoutParams = GetType ( ) . GetMethod ( "MethodWithoutParams" , BindingFlags . Instance | BindingFlags . NonPublic ) ;
162+ var methodWithoutParams = GetType ( ) . GetMethod ( nameof ( MethodWithoutParams ) , BindingFlags . Instance | BindingFlags . NonPublic )
163+ ?? throw new InvalidOperationException ( $ "Unable to locate the { nameof ( MethodWithoutParams ) } method via reflection.") ;
163164 var methodWithoutParamsDelegate = ( Action < IInvocation > ) methodWithoutParams . CreateDelegate ( typeof ( Action < IInvocation > ) , this ) ;
164165 methodMap . Add ( method , methodWithoutParamsDelegate ) ;
165166 }
You can’t perform that action at this time.
0 commit comments