本文整理汇总了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;
}
示例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));
}
示例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;
});
}
示例4: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context)
{
context.strResultLongText = GetLargestProductInSeries(_limit, _numericSeries);
return context;
}
示例5: PerformGetInput
public void PerformGetInput(IEulerPluginContext context)
{
_limit = GetLimit();
_numericSeries = GetSeries();
}
示例6: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context) {
context.strResultLongText = SumOfEventFibonacci(_limit);
return context;
}
示例7: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context)
{
context.strResultLongText = GetLargestPalindromicProduct(_limit);
return context;
}
示例8: PerformGetInput
public void PerformGetInput(IEulerPluginContext context)
{
_limit = GetLimit();
}
示例9: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context)
{
context.strResultLongText = GetSumOfFirstNPrimes(_limit);
return context;
}
示例10: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context) {
context.strResultLongText = GetLargestPrimeFactor(_limit);
return context;
}
示例11: PerformAction
public IEulerPluginContext PerformAction(IEulerPluginContext context)
{
context.strResultLongText = CalculateTriangularNumbers(_limit);
return context;
}
示例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;
}