Пример #1
0
        public ProtoBufferFile(string fileName, ProtoBufferDic dic, IEnumerable <string> content) : this(fileName, dic)
        {
            int lineNumber = 1;

            foreach (string str in content)
            {
                string trimed = str.Trim();
                Line   line   = new Line(this, lineNumber, trimed);
                Lines.Add(line);
                lineNumber++;
            }
        }
Пример #2
0
 public ProtoBufferFile(string fileName,ProtoBufferDic dic,IEnumerable<string> content)
     : this(fileName,dic)
 {
     int lineNumber = 1;
     foreach (string str in content)
     {
         string trimed = str.Trim();
         Line line = new Line(this, lineNumber, trimed);
         Lines.Add(line);
         lineNumber++;
     }
 }
Пример #3
0
 public ProtoBufferFile(string fileName, ProtoBufferDic dic)
 {
     Messages = new List <ProtoBufferMessage>();
     Lines    = new List <Line>();
     Import   = new List <ProtoBufferFile>();
     Option   = new List <KeyValuePair <string, string> >();
     if (!fileName.EndsWith(".proto"))
     {
         throw new ProtoBufferException(string.Format("文件名称错误,没有以.proto结尾。{0},", fileName));
     }
     FileName = fileName;
     Dic      = dic;
 }
Пример #4
0
 public ProtoBufferFile(string fileName,ProtoBufferDic dic)
 {
     Messages = new List<ProtoBufferMessage>();
     Lines = new List<Line>();
     Import = new List<ProtoBufferFile>();
     Option = new List<KeyValuePair<string, string>>();
     if (!fileName.EndsWith(".proto"))
     {
         throw new ProtoBufferException(string.Format("文件名称错误,没有以.proto结尾。{0},",fileName));
     }
     FileName = fileName;
     Dic = dic;
 }