本文整理汇总了C#中IEulerPluginContext类的典型用法代码示例。如果您正苦于以下问题:C# IEulerPluginContext类的具体用法?C# IEulerPluginContext怎么用?C# IEulerPluginContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IEulerPluginContext类属于命名空间,在下文中一共展示了IEulerPluginContext类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context)
{
List<string> Characters = new List<string>();
Characters.AddRange(_characters.Split(','));
context.strResultLongText = Permutations(Characters, _limit);
return context;
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:7,代码来源:plugin.cs
示例2: PerformActionAsync
private async void PerformActionAsync(IEulerPlugin plugin, IEulerPluginContext context) {
Task<IEulerPluginContext> tContext = plugin.PerformActionAsync(context);
context = await tContext;
textBox1.AppendText(string.Format("{0}{1}", plugin.Name, Environment.NewLine));
textBox1.AppendText(String.Format(" {0}{1}", context.strResultLongText, System.Environment.NewLine));
textBox1.AppendText(string.Format(" Results Calculated in: {0} ms{1}", context.spnDuration.TotalMilliseconds, Environment.NewLine));
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:8,代码来源:MainForm.cs
示例3: PerformActionAsync
public Task<IEulerPluginContext> PerformActionAsync(IEulerPluginContext context)
{
return Task.Factory.StartNew(() =>
{
// need a more elegant solution.
DateTime dtStart, dtEnd;
dtStart = DateTime.Now;
Task<String> s = BruteForceAsync();
dtEnd = DateTime.Now;
context.strResultLongText = s.Result;
context.spnDuration = dtEnd.Subtract(dtStart);
return context;
});
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:14,代码来源:plugin.cs
示例4: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context)
{
context.strResultLongText = GetLargestProductInSeries(_limit, _numericSeries);
return context;
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:5,代码来源:Problem+8.cs
示例5: PerformGetInput
public void PerformGetInput(IEulerPluginContext context)
{
_limit = GetLimit();
_numericSeries = GetSeries();
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:6,代码来源:Problem+8.cs
示例6: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context) {
context.strResultLongText = SumOfEventFibonacci(_limit);
return context;
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:4,代码来源:Problem+2.cs
示例7: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context)
{
context.strResultLongText = GetLargestPalindromicProduct(_limit);
return context;
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:5,代码来源:Problem+4.cs
示例8: PerformGetInput
public void PerformGetInput(IEulerPluginContext context)
{
_limit = GetLimit();
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:4,代码来源:plugin.cs
示例9: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context)
{
context.strResultLongText = GetSumOfFirstNPrimes(_limit);
return context;
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:5,代码来源:Problem+10.cs
示例10: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context) {
context.strResultLongText = GetLargestPrimeFactor(_limit);
return context;
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:4,代码来源:Problem+3.cs
示例11: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context)
{
context.strResultLongText = CalculateTriangularNumbers(_limit);
return context;
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:5,代码来源:Problem+12.cs
示例12: PerformAction
// The single point of entry to our plugin.
// Accepts an IEulerPluginContext object.
public IEulerPluginContext PerformAction( IEulerPluginContext context)
{
context.strResultLongText = AlternateSum(_limit);
return context;
}
开发者ID:TheCriticalPath,项目名称:Project-Euler,代码行数:7,代码来源:Problem+1.cs
注:本文中的IEulerPluginContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论