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

python操作sharepoint对象模型

 2010-09-22 11:27:22 来源:WEB开发网   
核心提示: PyListCollectionusing System;using System.Collections.Generic;using System.Text;using Microsoft.SharePoint;using System.Runtime.InteropServices;n

PyListCollection

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using System.Runtime.InteropServices;

namespace PySP
{
    [ComVisible(true)]
    public  class PyListCollection
    {
        protected SPListCollection lists;

        protected void EnsureLists()
        {
            if (this.lists == null)
                throw new NullReferenceException("the lists object can't be null!");
        }

        public PyListCollection() { }

        public PyListCollection(SPListCollection lists)
        {
            this.lists = lists;
        }

        public int Count
        {
            get
            {
                EnsureLists();
                return this.lists.Count;
            }
        }

        public PyList GetListByIndex(int index)
        {
            EnsureLists();
            return  new PyList(this.lists[index]);
        }

        public PyList GetListByName(string name)
        {
            EnsureLists();
            return new PyList(this.lists[name]);
        }

    }
}

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

Tags:python 操作 sharepoint

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