Exemplo n.º 1
0
        public FreeDocument DictSerialize(Scenario scenario = Scenario.Database)
        {
            var freedoc = new FreeDocument {
                { "MapperIndex1", MapperIndex1 }, { "MapperIndex2", MapperIndex2 }, { "OutputIndex", OutputIndex }, { "Name", Name }, { "Level", Level }
            };
            var tool = Publisher as SmartETLTool;

            if (tool != null)
            {
                freedoc.Add("Publisher", tool.Name);
                freedoc.Add("GenerateMode", tool.GenerateMode);
            }

            if (Seeds == null)
            {
                return(freedoc);
            }
            var seed = new FreeDocument
            {
                Children = Seeds.Select(d => d.DictSerialize()).ToList()
            };

            freedoc.Add("Seeds", seed);
            return(freedoc);
        }