Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (45 sloc) 1.743 kB
<#@ template language="C#v3.5"#>
// <autogenerated>
// This code was generated by a tool. Any changes made manually will be lost
// the next time this code is regenerated.
// </autogenerated>
using System;
namespace ContinuousLinq.Expressions
{
public static class Partials
{
<#for(int iOpen=1;iOpen<=20;iOpen++){#><#for(int iClose=1;iClose<=19-iOpen;iClose++){#>
public static Func<<#FormatRange("T{0}, ",1, iOpen); #>TReturn> Partial<<#FormatRange("TC{0}, ", 1, iClose); #><#FormatRange("T{0}, ", 1, iOpen); #>TReturn>(this Func<<# FormatRange("TC{0}, ",1, iClose); #><# FormatRange("T{0}, ",1, iOpen); #>TReturn> function, <# FormatRange("TC{0} tc{0}", ", ", 1, iClose); #>)
{
return (<#FormatRange("t{0}", ", ", 1, iOpen); #>) => function(<#FormatRange("tc{0}", ", ", 1, iClose); #>, <#FormatRange("t{0}", ", ", 1, iOpen); #>);
}
<#}#><#}#>
}
}
namespace System
{
<#for(int i=5;i<=20;i++){#>public delegate TResult Func<T1, T2, T3, T4, <#FormatRange("T{0}, ", 5, i); #>TResult>(<#FormatRange("T{0} t{0}", ", ", 1, i);#>);
<#}#>
<#for(int i=5;i<=20;i++){#>public delegate void Action<T1, T2, T3, T4, <#FormatRange("T{0}", ", ", 5, i); #>>(<#FormatRange("T{0} t{0}", ", ", 1, i);#>);
<#}#>
}
<#+
private void FormatRange(string itemFormatString, int start, int end)
{
for(int i = start; i <= end; i++)
{
this.Write(string.Format(itemFormatString, i));
}
}
private void FormatRange(string itemFormatString, string separatorFormatString, int start, int end)
{
for(int i = start; i <= end; i++)
{
this.Write(string.Format(itemFormatString, i));
if(i != end)
{
this.Write(string.Format(separatorFormatString, i));
}
}
}
#>
Jump to Line
Something went wrong with that request. Please try again.