##// END OF EJS Templates
refactoring
cin -
r275:6fefd5811b9b v3
parent child
Show More
@@ -0,0 +1,12
1 using System.Collections.Generic;
2
3 namespace Implab.ServiceHost.Unity
4 {
5 public interface IArrayInjectionParameter {
6
7 string TypeName { get; }
8
9 IEnumerable<IInjectionParameter> Items { get; }
10
11 }
12 } No newline at end of file
@@ -0,0 +1,5
1 namespace Implab.ServiceHost.Unity {
2 public interface IInjectionParameter {
3 void Visit(InjectionValueBuilder builder);
4 }
5 } No newline at end of file
@@ -5,7 +5,7 namespace Implab.ServiceHost.Unity
5 get { return null; }
5 get { return null; }
6 }
6 }
7
7
8 internal override void Visit(InjectionValueBuilder builder) {
8 public override void Visit(InjectionValueBuilder builder) {
9 builder.Visit(this);
9 builder.Visit(this);
10 }
10 }
11 }
11 }
@@ -9,7 +9,7 namespace Implab.ServiceHost.Unity {
9 [XmlAttribute("optional")]
9 [XmlAttribute("optional")]
10 public bool Optional { get; set; }
10 public bool Optional { get; set; }
11
11
12 internal override void Visit(InjectionValueBuilder builder) {
12 public override void Visit(InjectionValueBuilder builder) {
13 builder.Visit(this);
13 builder.Visit(this);
14 }
14 }
15 }
15 }
@@ -1,8 +1,10
1 namespace Implab.ServiceHost.Unity {
1 namespace Implab.ServiceHost.Unity {
2 public interface IDependencyReference {
2 public interface IDependencyReference {
3
3
4 string TypeName { get; set; }
4 string TypeName { get; }
5
6 bool Optional { get; }
5
7
6 string DependencyName { get; set; }
8 string DependencyName { get; }
7 }
9 }
8 } No newline at end of file
10 }
@@ -1,5 +1,6
1 namespace Implab.ServiceHost.Unity {
1 namespace Implab.ServiceHost.Unity {
2 public interface ITextValue {
2 public interface ITextValue {
3
3 string TypeName { get; }
4 string TypeName { get; }
4
5
5 string Value { get; }
6 string Value { get; }
@@ -2,11 +2,11 using System;
2 using System.Xml.Serialization;
2 using System.Xml.Serialization;
3
3
4 namespace Implab.ServiceHost.Unity {
4 namespace Implab.ServiceHost.Unity {
5 public abstract class InjectionParameterElement {
5 public abstract class InjectionParameterElement : IInjectionParameter {
6
6
7 [XmlAttribute("type")]
7 [XmlAttribute("type")]
8 public string TypeName { get; set; }
8 public string TypeName { get; set; }
9
9
10 internal abstract void Visit(InjectionValueBuilder builder);
10 public abstract void Visit(InjectionValueBuilder builder);
11 }
11 }
12 } No newline at end of file
12 }
@@ -21,6 +21,8 namespace Implab.ServiceHost.Unity
21 }
21 }
22 }
22 }
23
23
24 public string TypeName => throw new NotImplementedException();
25
24 public override void Visit(ContainerBuilder context) {
26 public override void Visit(ContainerBuilder context) {
25 context.Visit(this);
27 context.Visit(this);
26 }
28 }
@@ -33,5 +35,9 namespace Implab.ServiceHost.Unity
33
35
34 throw new Exception("No content found, expected XML document");
36 throw new Exception("No content found, expected XML document");
35 }
37 }
38
39 public void Visit(InjectionValueBuilder builder) {
40 throw new NotImplementedException();
41 }
36 }
42 }
37 } No newline at end of file
43 }
@@ -21,7 +21,7 namespace Implab.ServiceHost.Unity
21 throw new Exception("No content found, expected XML document");
21 throw new Exception("No content found, expected XML document");
22 }
22 }
23
23
24 internal override void Visit(InjectionValueBuilder builder) {
24 public override void Visit(InjectionValueBuilder builder) {
25 builder.Visit(this);
25 builder.Visit(this);
26 }
26 }
27 }
27 }
@@ -6,7 +6,7 namespace Implab.ServiceHost.Unity {
6 [XmlAttribute("value")]
6 [XmlAttribute("value")]
7 public string Value { get; set; }
7 public string Value { get; set; }
8
8
9 internal override void Visit(InjectionValueBuilder builder) {
9 public override void Visit(InjectionValueBuilder builder) {
10 builder.Visit(this);
10 builder.Visit(this);
11 }
11 }
12 }
12 }
General Comments 3
Under Review
author

Auto status change to "Under Review"

Approved
author

ok, latest stable version should be in default

You need to be logged in to leave comments. Login now