Esempio n. 1
0
        /// <summary>
        /// Adds an <see cref="Assembly"/> based on a service <see cref="Type"/>.
        /// </summary>
        /// <param name="serviceType">The <see cref="Type"/> that contains a service.</param>
        public void AddServiceAssembly(Type serviceType)
        {
            if (serviceType == null)
            {
                throw new ArgumentNullException(nameof(serviceType));
            }

            var asm = serviceType.GetTypeInfo().Assembly;

            ServiceAssemblies.Add(asm);
        }
Esempio n. 2
0
        public void RegisterServiceAssembly(Assembly assembly)
        {
            if (ServiceAssemblies == null)
            {
                ServiceAssemblies = new List <Assembly>();
            }

            if (assembly != null)
            {
                ServiceAssemblies.Add(assembly);
            }
        }