WEB开发网
开发学院软件开发Python python操作sharepoint对象模型 阅读

python操作sharepoint对象模型

 2010-09-22 11:27:22 来源:WEB开发网   
核心提示: PyListItemCollection1 using System;2 using System.Collections.Generic;3 using System.Text;4 using Microsoft.SharePoint;5 using System.Runtime.Int

PyListItemCollection

 1 using System;
 2 using System.Collections.Generic;
 3 using System.Text;
 4 using Microsoft.SharePoint;
 5 using System.Runtime.InteropServices;
 6
 7 namespace PySP
 8 {
 9     [ComVisible(true)]
10     public class PyListItemCollection
11     {
12         protected SPListItemCollection items = null;
13
14         protected void EnsureListItems()
15         {
16             if (items == null)
17                 throw new NullReferenceException("the items object can't be null!");
18         }
19
20         public PyListItemCollection() { }
21
22         public PyListItemCollection(SPListItemCollection items)
23         {
24             this.items = items;
25             EnsureListItems();
26         }
27
28         public int Count
29         {
30             get
31             {
32                 EnsureListItems();
33                 return this.items.Count;
34             }
35         }
36
37         public PyListItem GetItemByIndex(int index)
38         {
39             EnsureListItems();
40             return new PyListItem(this.items[index]);
41         }
42     }
43 }
44

上一页  1 2 3 4 5 6 7  下一页

Tags:python 操作 sharepoint

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接