diff Implab.ServiceHost/Unity/AbstractRegistration.cs @ 269:ff581cff7003 v3

Working on Unity container xml configuration
author cin
date Tue, 24 Apr 2018 01:46:02 +0300
parents
children ade80d94dfb5
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Implab.ServiceHost/Unity/AbstractRegistration.cs	Tue Apr 24 01:46:02 2018 +0300
@@ -0,0 +1,22 @@
+using System;
+using System.Xml.Serialization;
+using Unity.Lifetime;
+using Unity.Registration;
+
+namespace Implab.ServiceHost.Unity
+{
+    public abstract class AbstractRegistration : IConfigurationElement {
+
+        /// <summary>
+        /// An optional name for a registration in the container
+        /// </summary>
+        [XmlAttribute("name")]
+        public string Name {
+            get; set;
+        }
+
+        public void Visit(ConfigurationContext context) {
+            context.Visist(this);
+        }
+    }
+}
\ No newline at end of file