File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 2323 <IncludeSymbols >true</IncludeSymbols >
2424 <SymbolPackageFormat >snupkg</SymbolPackageFormat >
2525 </PropertyGroup >
26+ <PropertyGroup >
27+ <DefineConstants >$(DefineConstants);CONTRACTS_FULL</DefineConstants >
28+ </PropertyGroup >
2629 <ItemGroup >
2730 <PackageReference Include =" Autofac" />
2831 <PackageReference Include =" System.Collections.Immutable" Condition =" '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netstandard2.1'" />
Original file line number Diff line number Diff line change 11using System . Collections . Immutable ;
2+ using System . Diagnostics . Contracts ;
23using Autofac ;
34using Autofac . Core ;
45
@@ -13,23 +14,27 @@ public ModuleBuilder()
1314
1415 private ModuleBuilder ( ImmutableList < Register > registrations )
1516 => _registrations = registrations ;
16- }
1717
18+ [ Pure ]
1819 public ModuleBuilder RegisterInstance < T > ( T instance )
1920 where T : class
2021 => Register ( builder => builder . RegisterInstance ( instance ) ) ;
2122
23+ [ Pure ]
2224 public ModuleBuilder RegisterModule < TModule > ( )
2325 where TModule : IModule , new ( )
2426 => Register ( builder => builder . RegisterModule < TModule > ( ) ) ;
2527
28+ [ Pure ]
2629 public ModuleBuilder RegisterModule < TModule > ( TModule module )
2730 where TModule : IModule
2831 => Register ( builder => builder . RegisterModule ( module ) ) ;
2932
33+ [ Pure ]
3034 public ModuleBuilder Register ( Register registrationFunction )
3135 => ShallowClone ( _registrations . Add ( registrationFunction ) ) ;
3236
37+ [ Pure ]
3338 public IModule Build ( )
3439 => new ModuleRegistrar ( _registrations ) ;
3540
You can’t perform that action at this time.
0 commit comments