Beispiel #1
0
 public GestoreInformazioni(Dictionary <Type, Type> typeProviders)
 {
     _factoryVisitor = new FactoryVisitor();
     _providers      = new Dictionary <IinformationProvider, IinformationProviderVisitor>();
     foreach (Type prov in typeProviders.Keys)
     {
         _providers.Add((IinformationProvider)Activator.CreateInstance(prov), _factoryVisitor.GetVisitor(typeProviders[prov]));
     }
 }
 public GestoreInformazioni(Dictionary<Type, Type> typeProviders)
 {
     _factoryVisitor = new FactoryVisitor();
     _providers = new Dictionary<IinformationProvider, IinformationProviderVisitor>();
     foreach(Type prov in typeProviders.Keys)
     {
         _providers.Add((IinformationProvider)Activator.CreateInstance(prov), _factoryVisitor.GetVisitor(typeProviders[prov]));
     }
 }