Example #1
0
        private void EmitField(string line, int fieldIndex)
        {
            Match m = _field.Match(line);

            if (!m.Success)
            {
                throw new Exception("field definition does not match expected format: " + line);
            }

            string name = CreateUniqieFieldName(m.Groups[1].Value, fieldIndex);
            string type = m.Groups[2].Value;

            if (fieldIndex > 0)
            {
                _sb.AppendLine();
            }

            string manifestType;

            if (!_typeMap.TryGetValue(type, out manifestType) || manifestType == null)
            {
                manifestType = "win:UnicodeString";
            }
            _sb.AppendFormat("            [EventField(0, {0}, \"{1}\")]", fieldIndex, manifestType);
            _sb.AppendLine();
            string cShapType = ManifestParser.CleanType(manifestType);

            _sb.AppendFormat("            public {0} {1}", cShapType, name);
            _sb.AppendLine(" { get; set; }");
        }
Example #2
0
        public static Dictionary <string, string> Parse(string manifest)
        {
            var parser = new ManifestParser(manifest);

            return(parser._code);
        }
Example #3
0
 public static Dictionary<string, string> Parse(string manifest)
 {
     var parser = new ManifestParser(manifest);
     return parser._code;
 }