protected override object GetToolTip(TokenClassificationTag <PSToken> tokenTag)
            {
                PSToken token = tokenTag.Token;
                var     sb    = new StringBuilder();

                sb.AppendFormat("Content: {0}", token.Content);
                sb.AppendLine();
                sb.AppendFormat("Length: {0}", token.Length);
                sb.AppendLine();
                sb.AppendFormat("Type: {0}", token.Type);
                sb.AppendLine();
                sb.AppendFormat("StartLine: {0}", token.StartLine);
                sb.AppendLine();
                sb.AppendFormat("EndLine: {0}", token.EndLine);
                sb.AppendLine();
                sb.AppendFormat("Start: {0}", token.Start);
                sb.AppendLine();
                sb.AppendFormat("StartLine: {0}", token.StartLine);
                sb.AppendLine();
                sb.AppendFormat("StartColumn: {0}", token.StartColumn);
                sb.AppendLine();
                sb.AppendFormat("EndLine: {0}", token.EndLine);
                sb.AppendLine();
                sb.AppendFormat("EndColumn: {0}", token.EndColumn);

                return(sb.ToString());
            }
예제 #2
0
        public void WhenAClassificationTypeIsPassedIntoTheCtor_ThenTheCorrespondingPropertyIsSetProperly()
        {
            IClassificationType classificationType = new Mock <IClassificationType>().Object;
            var tag = new TokenClassificationTag <object>(classificationType);

            Assert.Equal(classificationType, tag.ClassificationType);
        }
 public void WhenAClassificationTypeIsPassedIntoTheCtor_ThenTheCorrespondingPropertyIsSetProperly()
 {
     IClassificationType classificationType = new Mock<IClassificationType>().Object;
     var tag = new TokenClassificationTag<object>( classificationType );
     Assert.Equal( classificationType, tag.ClassificationType );
 }