Ejemplo n.º 1
0
        public static CloudMaker CreateMaker(CloudSettings cloudSettings, DrawingSettings drawingSettings)
        {
            var container = new ContainerBuilder();

            container.RegisterTypeByPrefixAs <ICloudLayouter>(cloudSettings.TLayouter);
            container.RegisterTypeByPrefixAs <IWordsCounter>(cloudSettings.TCounter);
            container.RegisterTypeByPrefixAs <IWeightScaler>(cloudSettings.TScaler);
            container.Register(c => cloudSettings).AsSelf();
            container.Register(c => drawingSettings).AsSelf();
            container.RegisterType <CloudDrawer>().AsSelf();
            container.RegisterType <CloudMaker>().AsSelf();
            return((CloudMaker)container.Build().Resolve(typeof(CloudMaker)));
        }
Ejemplo n.º 2
0
 public static CloudMaker DefaultMaker() =>
 CreateMaker(CloudSettings.Default(), DrawingSettings.Default());