The LinqLanguageEditor2022 Allows you to select LINQ Queries in side you code and get the results from inside Visual Studio 2022.
This Language Editor's current features are:
CSharp Code Syntax Colorzation Support (Note: Our use of .linq files are created as CSharp files and use
syntax and formatted provide by the CSharp Compiler but have a .linq file extension.)
Writes and Reads from the Visual Studio 2022 Settings Store
IntelliSense Support
ToolWindow Support
Toolbar in ToolWindow
Toolbar buttons in ToolWindow
ToolWindow Messenger Support
CScripting Support to compile and display LINQ Query Results in ToolWindow
Select LINQ Queries and create new temporary tab document, display in
document in temporary view tab, and return query results in the LINQ Query Tool Window
.
LINQ language file extension .linq
IVsRunningDocTableEvents document events support
Code Formatting
Sample LINQ Query:
private static void Sample_Aggregate_Lambda_Simple()
{
//Now is the time for all good people to come to the aid of their country!
var result = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }.Aggregate((a, b) => a * b);
Console.WriteLine("Aggregated numbers by multiplication:");
Debug.WriteLine(result);
}
Select the LINQ Query in Visual Studio Editor then click the LINQ Query Tool Window button:
Results:
Temp Editor Window:
Tools Options Page:
Supports changing the results variable:
static void Sample_OrderBy_Lambda_Dates()
{
//This works now!
var dates = new DateTime[] {
new DateTime(2015, 2, 15),
new DateTime(2015, 3, 25),
new DateTime(2015, 1, 5)
};
var results = dates.OrderBy(d => d);
Debug.WriteLine("Ordered list of dates:");
foreach (DateTime dt in results)
Debug.WriteLine(dt.ToString("yyyy/MM/dd"));
}
Results: 'result' is not found but 'results' is available:
Popup allows you to choose the correct results variable from the query.
Now you get the correct results:
And temporary LINQ Query to modify and test: