【问题标题】:How to update the method definition in the optimized way utilizing less memory and be more efficient and fast? [closed]如何使用更少的内存以优化的方式更新方法定义,更高效、更快? [关闭]
【发布时间】:2013-12-19 09:41:09
【问题描述】:

代码:

public void TestCollection(IEnumerable<ITestItem> testItems)
{
    SendOrPostCallback callback = delegate
    {
        foreach (var testItem in testItems.ToArray())
        {
            TestItemGroup tests;
            if (this.TryTestControls(testItem, out tests))
            {
                int count = 0;
                foreach (var header in gridViewHeadersCollections)
                {
                    if (!(tests[count].DisplayText == header))
                    {
                        TestItem TI = new TestItem();
                        ITestCtrlItem IT = TI;
                        tests.TestItems.Insert(count, IT);
                        break;
                    }
                    count++;
                }
                continue;
            }

            this.testList.TestGroups.Add(
                new TestItemGroup(this.testList.DataProvider.GetTestGroup(testItem)));
        }
    };

    this.testList.Dispatcher.Invoke(DispatcherPriority.Send, callback, null);
}

ITestItem 是一个接口

testItem 是一个局部变量

TestItemGroup 是一个类

TryTestControls 是一个布尔方法

gridViewHeadersCollections 是 ICollection

tests 是一个局部变量

DisplayText 是一个字符串

TestItem 是一个类

ITestCtrlItem 是一个接口

TestItems 是一个 IList

GetTestGroup 是一个方法

如何以更优化的方式,利用更少的内存,更高效、更快速地更新方法定义?

【问题讨论】:

标签: c# .net wpf linq c#-4.0


【解决方案1】:

【讨论】:

  • 谢谢,我去看看。
猜你喜欢
  • 2018-07-10
  • 2019-11-22
  • 1970-01-01
  • 1970-01-01
  • 2022-01-25
  • 1970-01-01
  • 1970-01-01
  • 2020-06-18
  • 2014-04-14
相关资源
最近更新 更多