xamarin-macios/tests/scriptingbridge/test.cs

26 строки
562 B
C#
Исходник Постоянная ссылка Обычный вид История

2016-05-26 16:06:52 +03:00
using System;
using Finder;
using AppKit;
using ScriptingBridge;
namespace ScriptingBridge.Tests {
public static class MainClass {
static int Main (string [] args)
2016-05-26 16:06:52 +03:00
{
FinderApplication app = SBApplication.FromBundleIdentifier<FinderApplication> ("com.apple.finder");
if ((int) app.Trash.Items.Count > 0) {
for (int i = 0; i < (int) app.Trash.Items.Count; ++i) {
FinderItem item = app.Trash.Items.GetItem<FinderItem> ((nuint) i);
if (item.Name is null)
2016-05-26 16:06:52 +03:00
return 0;
}
}
Console.WriteLine ("Passed");
return 0;
}
}
}