/
Sample-StructureMapConfig.xml
137 lines (117 loc) · 5.05 KB
/
Sample-StructureMapConfig.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?xml version="1.0" encoding="utf-8" ?>
<StructureMap>
<Assembly Name="StructureMap.Testing.Widget"/>
<Assembly Name="StructureMap.Testing.Widget2"/>
<Assembly Name="StructureMap.Testing.Widget3"/>
<PluginFamily Type="StructureMap.Testing.Widget.IWidget" Assembly="StructureMap.Testing.Widget" DefaultKey="Red">
<Source Type="XmlFile" FilePath="FullTesting.XML" XPath="Widgets" NodeName="Widget"/>
<Plugin Assembly="StructureMap.Testing.Widget" Type="StructureMap.Testing.Widget.NotPluggableWidget" ConcreteKey="NotPluggable"/>
</PluginFamily>
<!-- If no source is defined, use the default MementoSource -->
<PluginFamily Type="StructureMap.Testing.Widget.Column" Assembly="StructureMap.Testing.Widget">
<Source Type="XmlFile" FilePath="FullTesting.XML" XPath="Columns" NodeName="Columns" />
</PluginFamily>
<PluginFamily Type="StructureMap.Testing.Widget.Rule" Assembly="StructureMap.Testing.Widget" DefaultKey="Blue">
<Interceptors>
<Interceptor Type="Singleton"></Interceptor>
</Interceptors>
<Instance Key="Red" Type="Color">
<Property Name="Color" Value="Red" />
</Instance>
<Instance Key="Blue" Type="Color">
<Property Name="Color" Value="Blue" />
</Instance>
<Instance Key="Bigger" Type="GreaterThan">
<Property Name="Attribute" Value="MyDad" />
<Property Name="Value" Value="10" />
</Instance>
</PluginFamily>
<Instances>
<StructureMap.Testing.Widget.GrandChild Type="Default" Key="Tommy">
<Property Name="RightHanded" Value="true" />
<Property Name="BirthYear" Value="1972" />
</StructureMap.Testing.Widget.GrandChild>
<StructureMap.Testing.Widget.GrandChild Type="Default" Key="Todd">
<Property Name="RightHanded" Value="true" />
<Property Name="BirthYear" Value="1975" />
</StructureMap.Testing.Widget.GrandChild>
<StructureMap.Testing.Widget.GrandChild Type="Leftie" Key="Trevor">
<Property Name="BirthYear" Value="1979" />
</StructureMap.Testing.Widget.GrandChild>
<StructureMap.Testing.Widget.Child Type="Default" Key="Tom">
<Property Name="Name" Value="Tom" />
<Property Name="MyGrandChild" Type="Leftie">
<Property Name="BirthYear" Value="1984" />
</Property>
</StructureMap.Testing.Widget.Child>
<StructureMap.Testing.Widget.Child Type="Default" Key="Marsha">
<Property Name="Name" Value="Marsha"/>
<Property Name="MyGrandChild" Key="Tommy"/>
</StructureMap.Testing.Widget.Child>
<StructureMap.Testing.Widget.Child Type="Default" Key="Jessica">
<Property Name="Name" Value="Jessica"/>
<Property Name="MyGrandChild"/>
</StructureMap.Testing.Widget.Child>
<StructureMap.Testing.Widget.Child Type="Default" Key="Monte">
<Property Name="Name" Value="Monte"/>
<Property Name="MyGrandChild" Key="NotARealGrandchild"/>
</StructureMap.Testing.Widget.Child>
<StructureMap.Testing.Widget.Parent Type="Default" Key="Jerry">
<Property Name="Age" Value="72"/>
<Property Name="EyeColor" Value="Blue"/>
<Property Name="MyChild" Key="Marsha"/>
</StructureMap.Testing.Widget.Parent>
<StructureMap.Testing.Widget.Parent Type="Default" Key="Jackie">
<Property Name="Age" Value="70"/>
<Property Name="EyeColor" Value="Green"/>
<Property Name="MyChild" Type="Default">
<Property Name="Name" Value="Elizabeth"/>
<Property Name="MyGrandChild" Type="Leftie">
<Property Name="BirthYear" Value="1992"/>
</Property>
</Property>
</StructureMap.Testing.Widget.Parent>
<StructureMap.Testing.Widget.WidgetMaker Type="Color" Key="Red">
<Property Name="Color" Value="Red" />
</StructureMap.Testing.Widget.WidgetMaker>
</Instances>
<Logging>
<Assembly Name="StructureMap.Testing">
<Logger Name="Logger1" Level="Debug"/>
<Logger Name="Logger2" Level="Error"/>
</Assembly>
<Namespace Name="StructureMap.Testing.Logging">
<Logger Name="Logger3" Level="Warn"/>
</Namespace>
</Logging>
<log4net>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" />
</layout>
</appender>
<appender name="OutputDebugStringAppender" type="log4net.Appender.OutputDebugStringAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
</layout>
</appender>
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL"></level>
</root>
<logger name="Logger1">
<appender-ref ref="ConsoleAppender"/>
<appender-ref ref="OutputDebugStringAppender"/>
</logger>
<logger name="Logger2">
<appender-ref ref="EventLogAppender"/>
</logger>
<logger name="Logger3">
<appender-ref ref="EventLogAppender"/>
</logger>
</log4net>
</StructureMap>