Esempio n. 1
0
        public string IncrementVersion(string content)
        {
            dynamic obj = JsonConvert.DeserializeObject(content);

            var shapes = obj.childShapes;

            foreach (var shape in shapes)
            {
                var properties = shape.properties;
                if (properties == null)
                {
                    continue;
                }
                var name = (string)properties.name;
                var id   = (string)properties.lcId;

                if (name == null || id == null)
                {
                    continue;
                }

                if (id.Contains("forcam"))
                {
                    properties.name = VersionIncrement.IncrementFlowReference((string)properties.name);
                }
            }

            return(PrettyPrinter.FormatJson(JsonConvert.SerializeObject(obj)));
        }
Esempio n. 2
0
        public string IncrementVersion(XmlDocument xml)
        {
            var process = xml["definitions"]["process"];

            foreach (XmlNode node in process.ChildNodes)
            {
                if (node.Name == "callActivity")
                {
                    var name    = node.Attributes["name"].InnerText;
                    var newName = VersionIncrement.IncrementFlowReference(name);
                    node.Attributes["name"].InnerText = newName;
                }
            }

            return(PomReader.XmlToPrettyString(xml));
        }