我有一些被删除的文件和文件夹在回收箱中。 当我恢复一个项目时, 我需要根据我的特殊算法恢复一些其它项目。 因此, 我使用以下代码“ 事件接收器” 中的代码片段来获取回收箱的项目 :
var recycleBinItems = properties.Web.GetRecycleBinItems(new SPRecycleBinQuery());
然后,我列举一下它们。但是这是一个漫长的操作, 所以我想要获得一个回收箱列表, 以便使用 CAML 来检索数据。 我怎样才能得到回收箱的对象?
我有一些被删除的文件和文件夹在回收箱中。 当我恢复一个项目时, 我需要根据我的特殊算法恢复一些其它项目。 因此, 我使用以下代码“ 事件接收器” 中的代码片段来获取回收箱的项目 :
var recycleBinItems = properties.Web.GetRecycleBinItems(new SPRecycleBinQuery());
然后,我列举一下它们。但是这是一个漫长的操作, 所以我想要获得一个回收箱列表, 以便使用 CAML 来检索数据。 我怎样才能得到回收箱的对象?
不幸的是,您无法通过 API 呼叫将 CAML 查询传送到回收箱 。 您已经注意到, 有 < a href=" http:// msdn. microsoft. com/ en- us/library/microsoft. sharepoint. spweb. getrecyclypinites. aspx" rel= “ nofollow” > Get ReccyclyBinemts a > 方法, 但是根据 SPWeb 类文件, 控制排序命令或限制返回的项目是有用的 。
""http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.recyclusbin.aspx" rel=“nofollow”>RecurcyBin SPWeb的属性基本上是相同的网关,尽管它默认返回所有项目 。
未来可以帮助您的事情是知道SPWeb有两个回收箱,一个在网络一级,另一个在网站收藏。你可以配置网络回收箱只保存一个星期或一个月的文件,鉴于您在更普通的情况下需要搜索的文件数量限制,所以这样做是有道理的。文件将从网络一级移到网站收集回收箱,如果需要,你还可以收回它们,还可以在一定的时间内保存它们。
What is the use of default keyword in C#? Is it introduced in C# 3.0 ?
I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...
I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...
I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...
I have two EF entities. One has a property called HouseNumber. The other has two properties, one called StartHouseNumber and one called EndHouseNumber. I want to create a many to many association ...
How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...
Since I cannot order my dictionary, what is the best way of going about taking key value pairs and also maintaing an index?
Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...