This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal static bool IsFirstInLine_1(this SyntaxToken token) | |
{ | |
return token.HasLeadingTrivia || token.GetLocation()?.GetMappedLineSpan().StartLinePosition.Character == 0; | |
} | |
internal static bool IsFirstInLine_2(this SyntaxToken token) | |
{ | |
var prevToken = token.GetPreviousToken(); | |
var leadingTriviaList = prevToken.TrailingTrivia.AddRange(token.LeadingTrivia); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.IO; | |
using System.Threading.Tasks; | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ |