Skip to content

Commit 6a1cf11

Browse files
Merge pull request #76 from Capgemini/master-scripting-better
Master scripting better
2 parents 0b2e622 + d0ac6d5 commit 6a1cf11

File tree

297 files changed

+5055
-1771
lines changed

Some content is hidden

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

297 files changed

+5055
-1771
lines changed

Cauldron.sln

Lines changed: 261 additions & 83 deletions
Large diffs are not rendered by default.

Fody/Cauldron.ActivatorInterceptors/Cauldron.ActivatorInterceptors.csproj

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,26 @@
3434
</DocumentationFile>
3535
</PropertyGroup>
3636
<ItemGroup>
37-
<Reference Include="FodyHelpers, Version=3.2.4.0, Culture=neutral, PublicKeyToken=1ca091877d12ca03, processorArchitecture=MSIL">
38-
<HintPath>..\..\packages\FodyHelpers.3.2.4\lib\net46\FodyHelpers.dll</HintPath>
39-
<Private>False</Private>
37+
<Reference Include="FodyHelpers, Version=3.2.13.0, Culture=neutral, PublicKeyToken=1ca091877d12ca03, processorArchitecture=MSIL">
38+
<HintPath>..\..\packages\FodyHelpers.3.2.13\lib\net46\FodyHelpers.dll</HintPath>
4039
</Reference>
4140
<Reference Include="Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=1ca091877d12ca03, processorArchitecture=MSIL">
42-
<HintPath>..\..\packages\FodyHelpers.3.2.4\lib\net46\Mono.Cecil.dll</HintPath>
43-
<Private>False</Private>
41+
<HintPath>..\..\packages\FodyHelpers.3.2.13\lib\net46\Mono.Cecil.dll</HintPath>
4442
</Reference>
4543
<Reference Include="Mono.Cecil.Mdb, Version=0.10.0.0, Culture=neutral, PublicKeyToken=1ca091877d12ca03, processorArchitecture=MSIL">
46-
<HintPath>..\..\packages\FodyHelpers.3.2.4\lib\net46\Mono.Cecil.Mdb.dll</HintPath>
47-
<Private>False</Private>
44+
<HintPath>..\..\packages\FodyHelpers.3.2.13\lib\net46\Mono.Cecil.Mdb.dll</HintPath>
4845
</Reference>
4946
<Reference Include="Mono.Cecil.Pdb, Version=0.10.0.0, Culture=neutral, PublicKeyToken=1ca091877d12ca03, processorArchitecture=MSIL">
50-
<HintPath>..\..\packages\FodyHelpers.3.2.4\lib\net46\Mono.Cecil.Pdb.dll</HintPath>
51-
<Private>False</Private>
47+
<HintPath>..\..\packages\FodyHelpers.3.2.13\lib\net46\Mono.Cecil.Pdb.dll</HintPath>
5248
</Reference>
5349
<Reference Include="Mono.Cecil.Rocks, Version=0.10.0.0, Culture=neutral, PublicKeyToken=1ca091877d12ca03, processorArchitecture=MSIL">
54-
<HintPath>..\..\packages\FodyHelpers.3.2.4\lib\net46\Mono.Cecil.Rocks.dll</HintPath>
55-
<Private>False</Private>
50+
<HintPath>..\..\packages\FodyHelpers.3.2.13\lib\net46\Mono.Cecil.Rocks.dll</HintPath>
5651
</Reference>
5752
<Reference Include="System" />
5853
<Reference Include="System.Core" />
54+
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
55+
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
56+
</Reference>
5957
<Reference Include="System.Xml.Linq" />
6058
<Reference Include="System.Data.DataSetExtensions" />
6159
<Reference Include="Microsoft.CSharp" />
@@ -64,8 +62,15 @@
6462
<Reference Include="System.Xml" />
6563
</ItemGroup>
6664
<ItemGroup>
65+
<Compile Include="ComponentAttributeValues.cs" />
6766
<Compile Include="Extensions.cs" />
68-
<Compile Include="Weaver_ComponentCache.cs" />
67+
<Compile Include="FactoryCreateUsages.cs" />
68+
<Compile Include="ComponentCacheWeaver.cs" />
69+
<Compile Include="FactoryTypeInfoWeaver.cs" />
70+
<Compile Include="FactoryTypeInfoWeaverBase.cs" />
71+
<Compile Include="FactoryTypeInfoWeaverDefault.cs" />
72+
<Compile Include="FactoryTypeInfoWeaverGeneric.cs" />
73+
<Compile Include="InjectAttributeValues.cs" />
6974
<Compile Include="Properties\AssemblyInfo.cs" />
7075
</ItemGroup>
7176
<ItemGroup>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using Cauldron.Interception.Cecilator;
2+
using Mono.Cecil;
3+
using System;
4+
5+
internal class ComponentAttributeValues
6+
{
7+
public ComponentAttributeValues(AttributedType attributedType)
8+
{
9+
if (attributedType.Attribute.Properties.ContainsKey("InvokeOnObjectCreationEvent")) this.InvokeOnObjectCreationEvent = (bool)attributedType.Attribute.Properties["InvokeOnObjectCreationEvent"].Value;
10+
foreach (var item in attributedType.Attribute.ConstructorArguments)
11+
{
12+
switch (item.Type.FullName)
13+
{
14+
case "System.String":
15+
this.ContractName = item.Value as string;
16+
break;
17+
18+
case "System.Type":
19+
this.ContractType = (item.Value as TypeReference)?.ToBuilderType() ?? item.Value as BuilderType ?? Builder.Current.Import(item.Value as Type)?.ToBuilderType();
20+
break;
21+
22+
case "System.UInt32":
23+
this.Priority = (uint)item.Value;
24+
break;
25+
26+
case "Cauldron.Activator.FactoryCreationPolicy":
27+
this.Policy = (int)item.Value;
28+
break;
29+
}
30+
}
31+
}
32+
33+
public string ContractName { get; }
34+
public BuilderType ContractType { get; }
35+
public bool InvokeOnObjectCreationEvent { get; }
36+
public int Policy { get; }
37+
public uint Priority { get; }
38+
}

0 commit comments

Comments
 (0)