Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Visual Studio snippet for explicitly importing MoreLINQ extensions to avoid current & future potential for conflicts with System.Linq or similar libraries
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Keywords>
<Keyword>linq</Keyword>
<Keyword>extensions</Keyword>
</Keywords>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Static import of MoreLINQ extensions</Title>
<Author>Atif Aziz</Author>
<Description>
Snippet for explicitly importing MoreLINQ extensions to avoid current and future potential for conflicts with System.Linq or similar libraries. Later, use "Remove and Sort Usings" (found in the Edit menu, under IntelliSense) to reduce the imports to those actually used in code.
</Description>
<HelpUrl>https://morelinq.github.io/</HelpUrl>
<Shortcut>morelinq</Shortcut>
</Header>
<Snippet>
<Code Language="csharp" Delimiter="$"><![CDATA[using MoreEnumerable = MoreLinq.MoreEnumerable;
using static MoreLinq.Extensions.AcquireExtension;
using static MoreLinq.Extensions.AggregateRightExtension;
using static MoreLinq.Extensions.AssertExtension;
using static MoreLinq.Extensions.AssertCountExtension;
using static MoreLinq.Extensions.AtLeastExtension;
using static MoreLinq.Extensions.AtMostExtension;
using static MoreLinq.Extensions.BacksertExtension;
using static MoreLinq.Extensions.BatchExtension;
using static MoreLinq.Extensions.CartesianExtension;
using static MoreLinq.Extensions.ChooseExtension;
using static MoreLinq.Extensions.CompareCountExtension;
using static MoreLinq.Extensions.ConsumeExtension;
using static MoreLinq.Extensions.CountBetweenExtension;
using static MoreLinq.Extensions.CountByExtension;
using static MoreLinq.Extensions.CountDownExtension;
using static MoreLinq.Extensions.DistinctByExtension;
using static MoreLinq.Extensions.EndsWithExtension;
using static MoreLinq.Extensions.EquiZipExtension;
using static MoreLinq.Extensions.EvaluateExtension;
using static MoreLinq.Extensions.ExactlyExtension;
using static MoreLinq.Extensions.ExceptByExtension;
using static MoreLinq.Extensions.ExcludeExtension;
using static MoreLinq.Extensions.FallbackIfEmptyExtension;
using static MoreLinq.Extensions.FillBackwardExtension;
using static MoreLinq.Extensions.FillForwardExtension;
using static MoreLinq.Extensions.FirstExtension;
using static MoreLinq.Extensions.FirstOrDefaultExtension;
using static MoreLinq.Extensions.FlattenExtension;
using static MoreLinq.Extensions.FoldExtension;
using static MoreLinq.Extensions.ForEachExtension;
using static MoreLinq.Extensions.FullGroupJoinExtension;
using static MoreLinq.Extensions.FullJoinExtension;
using static MoreLinq.Extensions.GroupAdjacentExtension;
using static MoreLinq.Extensions.IndexExtension;
using static MoreLinq.Extensions.InsertExtension;
using static MoreLinq.Extensions.InterleaveExtension;
using static MoreLinq.Extensions.LagExtension;
using static MoreLinq.Extensions.LastExtension;
using static MoreLinq.Extensions.LastOrDefaultExtension;
using static MoreLinq.Extensions.LeadExtension;
using static MoreLinq.Extensions.LeftJoinExtension;
using static MoreLinq.Extensions.MaxByExtension;
using static MoreLinq.Extensions.MinByExtension;
using static MoreLinq.Extensions.MoveExtension;
using static MoreLinq.Extensions.OrderByExtension;
using static MoreLinq.Extensions.OrderedMergeExtension;
using static MoreLinq.Extensions.PadExtension;
using static MoreLinq.Extensions.PadStartExtension;
using static MoreLinq.Extensions.PairwiseExtension;
using static MoreLinq.Extensions.PartialSortExtension;
using static MoreLinq.Extensions.PartialSortByExtension;
using static MoreLinq.Extensions.PartitionExtension;
using static MoreLinq.Extensions.PermutationsExtension;
using static MoreLinq.Extensions.PipeExtension;
using static MoreLinq.Extensions.PreScanExtension;
using static MoreLinq.Extensions.RandomSubsetExtension;
using static MoreLinq.Extensions.RankExtension;
using static MoreLinq.Extensions.RankByExtension;
using static MoreLinq.Extensions.RepeatExtension;
using static MoreLinq.Extensions.RightJoinExtension;
using static MoreLinq.Extensions.RunLengthEncodeExtension;
using static MoreLinq.Extensions.ScanExtension;
using static MoreLinq.Extensions.ScanRightExtension;
using static MoreLinq.Extensions.SegmentExtension;
using static MoreLinq.Extensions.ShuffleExtension;
using static MoreLinq.Extensions.SingleExtension;
using static MoreLinq.Extensions.SingleOrDefaultExtension;
using static MoreLinq.Extensions.SkipUntilExtension;
using static MoreLinq.Extensions.SliceExtension;
using static MoreLinq.Extensions.SortedMergeExtension;
using static MoreLinq.Extensions.SplitExtension;
using static MoreLinq.Extensions.StartsWithExtension;
using static MoreLinq.Extensions.SubsetsExtension;
using static MoreLinq.Extensions.TagFirstLastExtension;
using static MoreLinq.Extensions.TakeEveryExtension;
using static MoreLinq.Extensions.TakeUntilExtension;
using static MoreLinq.Extensions.ThenByExtension;
using static MoreLinq.Extensions.ToArrayByIndexExtension;
using static MoreLinq.Extensions.ToDelimitedStringExtension;
using static MoreLinq.Extensions.ToDictionaryExtension;
using static MoreLinq.Extensions.ToLookupExtension;
using static MoreLinq.Extensions.TraceExtension;
using static MoreLinq.Extensions.TransposeExtension;
using static MoreLinq.Extensions.WindowExtension;
using static MoreLinq.Extensions.WindowLeftExtension;
using static MoreLinq.Extensions.WindowRightExtension;
using static MoreLinq.Extensions.ZipLongestExtension;
using static MoreLinq.Extensions.ZipShortestExtension;
using static MoreLinq.Extensions.ToDataTableExtension;
]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.