コード例 #1
0
 public static TagType Opposite(TagType type)
 {
     return(IsClosing(type) ? CloseToOpen[type] : OpenToClose[type]);
 }
コード例 #2
0
 public static TagType Closing(TagType type)
 {
     return(IsClosing(type) ? type : OpenToClose[type]);
 }
コード例 #3
0
 public static bool IsClosing(TagType type)
 {
     return(CloseToOpen.ContainsKey(type));
 }
コード例 #4
0
 public Tag(TagType type, int position)
 {
     Type     = type;
     Position = position;
 }
コード例 #5
0
ファイル: TagsParser.cs プロジェクト: TAHK518/clean-code
 private static bool CanRemoveCurrentPairInTheFuture(IReadOnlyCollection <Tag> openingTags, IReadOnlyCollection <TagSpecification> currentSpecifications, TagType typeCurrentPair)
 {
     return(openingTags.FirstOrDefault(tag =>
                                       currentSpecifications.First(ts => ts.TagType == tag.TagType).IgnoreTags
                                       .Contains(typeCurrentPair)) != null);
 }
コード例 #6
0
 public Tag(int index, TokenType tokenType, TagType tagType)
 {
     Index     = index;
     TokenType = tokenType;
     TagType   = tagType;
 }