# HG changeset patch # User cin # Date 1524837450 -10800 # Node ID 6fefd5811b9bf5c516add62af45628efc0cedbcb # Parent 22629bf26121d959c790ef41a541f21a48c76ed7 refactoring diff -r 22629bf26121 -r 6fefd5811b9b Implab.ServiceHost/Unity/DefaultParameterElement.cs --- a/Implab.ServiceHost/Unity/DefaultParameterElement.cs Fri Apr 27 04:47:52 2018 +0300 +++ b/Implab.ServiceHost/Unity/DefaultParameterElement.cs Fri Apr 27 16:57:30 2018 +0300 @@ -5,7 +5,7 @@ get { return null; } } - internal override void Visit(InjectionValueBuilder builder) { + public override void Visit(InjectionValueBuilder builder) { builder.Visit(this); } } diff -r 22629bf26121 -r 6fefd5811b9b Implab.ServiceHost/Unity/DependencyParameterElement.cs --- a/Implab.ServiceHost/Unity/DependencyParameterElement.cs Fri Apr 27 04:47:52 2018 +0300 +++ b/Implab.ServiceHost/Unity/DependencyParameterElement.cs Fri Apr 27 16:57:30 2018 +0300 @@ -9,7 +9,7 @@ [XmlAttribute("optional")] public bool Optional { get; set; } - internal override void Visit(InjectionValueBuilder builder) { + public override void Visit(InjectionValueBuilder builder) { builder.Visit(this); } } diff -r 22629bf26121 -r 6fefd5811b9b Implab.ServiceHost/Unity/IDependencyReference.cs --- a/Implab.ServiceHost/Unity/IDependencyReference.cs Fri Apr 27 04:47:52 2018 +0300 +++ b/Implab.ServiceHost/Unity/IDependencyReference.cs Fri Apr 27 16:57:30 2018 +0300 @@ -1,8 +1,10 @@ namespace Implab.ServiceHost.Unity { public interface IDependencyReference { - string TypeName { get; set; } + string TypeName { get; } + + bool Optional { get; } - string DependencyName { get; set; } + string DependencyName { get; } } } \ No newline at end of file diff -r 22629bf26121 -r 6fefd5811b9b Implab.ServiceHost/Unity/IInjectionArray.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Implab.ServiceHost/Unity/IInjectionArray.cs Fri Apr 27 16:57:30 2018 +0300 @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace Implab.ServiceHost.Unity +{ + public interface IArrayInjectionParameter { + + string TypeName { get; } + + IEnumerable Items { get; } + + } +} \ No newline at end of file diff -r 22629bf26121 -r 6fefd5811b9b Implab.ServiceHost/Unity/IInjectionParameter.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Implab.ServiceHost/Unity/IInjectionParameter.cs Fri Apr 27 16:57:30 2018 +0300 @@ -0,0 +1,5 @@ +namespace Implab.ServiceHost.Unity { + public interface IInjectionParameter { + void Visit(InjectionValueBuilder builder); + } +} \ No newline at end of file diff -r 22629bf26121 -r 6fefd5811b9b Implab.ServiceHost/Unity/ITextValue.cs --- a/Implab.ServiceHost/Unity/ITextValue.cs Fri Apr 27 04:47:52 2018 +0300 +++ b/Implab.ServiceHost/Unity/ITextValue.cs Fri Apr 27 16:57:30 2018 +0300 @@ -1,5 +1,6 @@ namespace Implab.ServiceHost.Unity { public interface ITextValue { + string TypeName { get; } string Value { get; } diff -r 22629bf26121 -r 6fefd5811b9b Implab.ServiceHost/Unity/InjectionParameterElement.cs --- a/Implab.ServiceHost/Unity/InjectionParameterElement.cs Fri Apr 27 04:47:52 2018 +0300 +++ b/Implab.ServiceHost/Unity/InjectionParameterElement.cs Fri Apr 27 16:57:30 2018 +0300 @@ -2,11 +2,11 @@ using System.Xml.Serialization; namespace Implab.ServiceHost.Unity { - public abstract class InjectionParameterElement { + public abstract class InjectionParameterElement : IInjectionParameter { [XmlAttribute("type")] public string TypeName { get; set; } - internal abstract void Visit(InjectionValueBuilder builder); + public abstract void Visit(InjectionValueBuilder builder); } } \ No newline at end of file diff -r 22629bf26121 -r 6fefd5811b9b Implab.ServiceHost/Unity/SerializedElement.cs --- a/Implab.ServiceHost/Unity/SerializedElement.cs Fri Apr 27 04:47:52 2018 +0300 +++ b/Implab.ServiceHost/Unity/SerializedElement.cs Fri Apr 27 16:57:30 2018 +0300 @@ -21,6 +21,8 @@ } } + public string TypeName => throw new NotImplementedException(); + public override void Visit(ContainerBuilder context) { context.Visit(this); } @@ -33,5 +35,9 @@ throw new Exception("No content found, expected XML document"); } + + public void Visit(InjectionValueBuilder builder) { + throw new NotImplementedException(); + } } } \ No newline at end of file diff -r 22629bf26121 -r 6fefd5811b9b Implab.ServiceHost/Unity/SerializedParameterElement.cs --- a/Implab.ServiceHost/Unity/SerializedParameterElement.cs Fri Apr 27 04:47:52 2018 +0300 +++ b/Implab.ServiceHost/Unity/SerializedParameterElement.cs Fri Apr 27 16:57:30 2018 +0300 @@ -21,7 +21,7 @@ throw new Exception("No content found, expected XML document"); } - internal override void Visit(InjectionValueBuilder builder) { + public override void Visit(InjectionValueBuilder builder) { builder.Visit(this); } } diff -r 22629bf26121 -r 6fefd5811b9b Implab.ServiceHost/Unity/ValueParameterElement.cs --- a/Implab.ServiceHost/Unity/ValueParameterElement.cs Fri Apr 27 04:47:52 2018 +0300 +++ b/Implab.ServiceHost/Unity/ValueParameterElement.cs Fri Apr 27 16:57:30 2018 +0300 @@ -6,7 +6,7 @@ [XmlAttribute("value")] public string Value { get; set; } - internal override void Visit(InjectionValueBuilder builder) { + public override void Visit(InjectionValueBuilder builder) { builder.Visit(this); } }