Exemple #1
0
        private void RegisterNormal(ContainerBuilder buildr, InstanceDef d)
        {
            if (d.Interface2 != null)
            {
                buildr.RegisterType(d.Implementation)
                .As(d.Interface1)
                .As(d.Interface2);
            }

            else if (d.Interface1 != null)
            {
                buildr.RegisterType(d.Implementation)
                .As(d.Interface1);
            }
            else
            {
                buildr.RegisterType(d.Implementation);
            }
        }
Exemple #2
0
        private void RegisterSingleton(ContainerBuilder buildr, InstanceDef d)
        {
            if (d.Interface2 != null)
            {
                buildr.RegisterType(d.Implementation)
                .As(d.Interface1)
                .As(d.Interface2)
                .SingleInstance();
            }

            else if (d.Interface1 != null)
            {
                buildr.RegisterType(d.Implementation)
                .As(d.Interface1)
                .SingleInstance();
            }

            else if (d.Interface1 == null)
            {
                buildr.RegisterType(d.Implementation)
                .SingleInstance();
            }
        }
Exemple #3
0
 public void AlterInstanceDef(string oldName, InstanceDef instanceDef)
 {
 }