public TagSuggestion(IThreadSafeTag tag) { TagId = tag.Id; Name = tag.Name; WorkspaceName = tag.Workspace.Name; WorkspaceId = tag.WorkspaceId; }
private static string ellipsize(IThreadSafeTag tag) { var tagLength = tag.Name.LengthInGraphemes(); if (tagLength <= MaxTagLength) { return(tag.Name); } return($"{tag.Name.UnicodeSafeSubstring(0, MaxTagLength)}..."); }
public TagSpan(IThreadSafeTag tag) : this(tag.Id, tag.Name) { }