示例#1
0
 public VitaEntryBuilder(VitaEntryType vitaEntryType, String title)
 {
     this.Lines         = new List <string>();
     this.Title         = title;
     this.VitaEntryType = vitaEntryType;
     this.Attributes    = VitaEntryAttribute.None;
     this.Code          = String.Empty;
 }
示例#2
0
        public VitaEntry(string title, string[] lines, VitaEntryType vitaEntryType, VitaEntryAttribute attributes, String codes)
        {
            this.Title         = title;
            this.Lines         = lines;
            this.VitaEntryType = vitaEntryType;
            Attributes         = attributes;
            var set = codes.Split(' ', StringSplitOptions.RemoveEmptyEntries)
                      .Select(x => x.Trim())
                      .ToHashSet();

            this.Codes = set.Contains("*") ? new HashSet <String>()
            {
                "*"
            } : set;
        }