本文整理汇总了C#中MonoDevelop.Projects.Workspace.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# Workspace.Dispose方法的具体用法?C# Workspace.Dispose怎么用?C# Workspace.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoDevelop.Projects.Workspace
的用法示例。
在下文中一共展示了Workspace.Dispose方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Disposing
public void Disposing ()
{
List<MyData> d = new List<MyData> ();
for (int n=0; n<7; n++)
d.Add (new MyData ());
DotNetProject it2, it3, it4;
DummySolutionItem it1;
Workspace ws = new Workspace ();
Workspace cws = new Workspace ();
ws.Items.Add (cws);
Solution sol1 = new Solution ();
cws.Items.Add (sol1);
sol1.RootFolder.Items.Add (it1 = new DummySolutionItem ());
sol1.RootFolder.Items.Add (it2 = Services.ProjectService.CreateDotNetProject ("C#"));
Solution sol2 = new Solution ();
cws.Items.Add (sol2);
SolutionFolder f = new SolutionFolder ();
sol2.RootFolder.Items.Add (f);
f.Items.Add (it3 = Services.ProjectService.CreateDotNetProject ("C#"));
f.Items.Add (it4 = Services.ProjectService.CreateDotNetProject ("C#"));
ws.ExtendedProperties ["data"] = d[0];
cws.ExtendedProperties ["data"] = d[1];
it1.ExtendedProperties ["data"] = d[2];
it2.ExtendedProperties ["data"] = d[3];
it3.ExtendedProperties ["data"] = d[4];
it4.ExtendedProperties ["data"] = d[5];
f.ExtendedProperties ["data"] = d[6];
ws.Dispose ();
for (int n=0; n<d.Count; n++)
Assert.AreEqual (1, d[n].Disposed, "dispose check " + n);
}