Skip to content

Commit

Permalink
Add help for area codes
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillOsenkov committed Nov 16, 2023
1 parent eac218a commit 59ef925
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/QuickInfo/Processors/AreaCodes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using static QuickInfo.NodeFactory;

namespace QuickInfo
{
Expand Down Expand Up @@ -423,6 +424,15 @@ public AreaCodes()

public object GetResult(Query query)
{
if (query.IsHelp)
{
return HelpTable
(
("425", "Bellevue, WA"),
("Seattle", "206")
);
}

string text = query.OriginalInput;

if (areaCodes.TryGetValue(text, out string city))
Expand Down

0 comments on commit 59ef925

Please sign in to comment.