public StyleCreator(ConfigFacade config, Randomizer randomizer)
 {
     randomNumber = new Random();
     configFacade = config;
     this.randomizer = randomizer;
     defaults = new Defaults();
 }
Example #2
0
 public RunConfig(String fileName, Defaults defaults)
 {
     XmlDocument doc = new XmlDocument();
     doc.Load(fileName);
     root = doc.DocumentElement;
     this.defaults = defaults;
 }
        public DocumentCreator(IDataProvider dataProvider, String outputFilePath, String runConfigPath, String docFeaturesPath)
        {
            docTree = new DocumentTree();

            randomNumberGen = new Random();
            defualts = new Defaults();
            xmlWriter = new XmlWriter(outputFilePath);
            runConfig = new RunConfig(runConfigPath, defualts);

            docFeatures = new DocFeatures(docFeaturesPath);
            config = new ConfigFacade(runConfig, docFeatures, defualts);
            randomGen = new Randomizer(config);
            styleCreator = new StyleCreator(config, randomGen);
            featureCreator = new FeatureCreator(config, dataProvider, randomGen);
        }
        public static Style CreateStyle(StyleInfo style, Defaults defaults)
        {
            Style tmp = new Style();
            tmp.Name = style.Name;
            tmp.Type = style.Type;
            tmp.Value = style.Value;

            if (style.Value.Equals("")) {

                String generated = GenerateValue(style);

                if (generated == null || generated.Equals("")) generated = defaults.GetDefaultStyleValue(style);

                tmp.Value = generated;
            }

            return tmp;
        }
 public ConfigFacade(RunConfig runConfig, DocFeatures docFeatures, Defaults defaults)
 {
     this.runConfig = runConfig;
     this.docFeatures = docFeatures;
     this.defaultConfig = defaults;
 }