Вам нужно будет извлечь _id из BsonDocument следующим образом:
var extractedIds = myIds.Select(x => x["_id"].ToString()).ToList();
После чего вы можете использовать его в фильтре.
list.DeleteMany(Builders<MessageExchange>.Filter.In("_id", extractedIds));
Убедитесь, что часть фильтра _id соответствует классу MessageExchange
Еще один способ сделать это - сделать его строго типизированным:
[112 ]Просто выстрел в темноте, но [STAThread] атрибут представляет на Основном Вашего приложения () методику? Без него перетаскивание не будет работать вообще. (Хотя этому не удается объяснить изменение в поведении с изменением прав на ИНТЕРАКТИВНОМ SID).
Вы должны запускать exe-файл для проекта непосредственно и вне среды Visual Studio. Я работаю на платформе Windows Vista.
You have two questions here:
- how adding those rights and D&D are related and ...
This I'm totally unsure about. We use D&D in our WinForm app to/from the shell and Outlook without any issues in Vista. I'm not even certain the ACL change you suggest will be certain to fix whatever issue your having.
- how to check / set those rights in Installation process?
The easy way to do this is to create a .Net install class and add the following code:
public static void ReplacePermissions(string filepath, WellKnownSidType sidType, FileSystemRights allow)
{
FileSecurity sec = File.GetAccessControl(filepath);
SecurityIdentifier sid = new SecurityIdentifier(sidType, null);
sec.PurgeAccessRules(sid); //remove existing
sec.AddAccessRule(new FileSystemAccessRule(sid, allow, AccessControlType.Allow));
File.SetAccessControl(filepath, sec);
}