SharePoint Foundation 事件目录

上次修改时间: 2015年3月9日

适用范围: SharePoint Foundation 2010

表 1 列出了属于 SharePoint Foundation 2010 事件对象模型的托管类型,并列出每个类型的相关成员,进而提供了 Microsoft SharePoint Foundation 2010 中的新增类型和成员。有关 SharePoint Foundation 事件对象模型的其他视图,请参阅 SharePoint 事件、事件接收器和事件宿主表事件接收器方法比较:Windows SharePoint Services 3.0 和 SharePoint Foundation 2010

SharePoint Foundation 事件对象模型

表 1. SharePoint Foundation 2010 事件对象模型中的托管类型和成员

类型

方法

属性/字段

SPContentType

n/a

SPEventReceiverDefinitionCollection EventReceivers

SPEmailEventReceiver

SPEmailEventReceiver()

void EmailReceived (Microsoft.SharePoint.SPList list, Microsoft.SharePoint.Utilities.SPEmailMessage emailMessage, string receiverData)

n/a

SPEventPropertiesBase

protected abstract void MarshalData()(2010 中的新增类型)

protected void SetUserTokens(byte[] userTokenBytes)(2010 中的新增类型)

protected void SetUserTokens()(2010 中的新增类型)

bool Cancel

string ErrorMessage

SPEventReceiverType EventType(2010 中的新增类型)

protected SPUserToken EventUserToken(2010 中的新增类型)

SPUserToken OriginatingUserToken(2010 中的新增类型)

string ReceiverData(2010 中的新增类型)

string RedirectUrl(2010 中的新增类型)

Guid SiteId(2010 中的新增类型)

SPEventReceiverStatus Status

SPEventReceiverBase

SPEventReceiverBase()

protected void DisableEventFiring()

protected void EnableEventFiring()

n/a

SPEventReceiverDefinition

void Delete()

void FireContextEvent (SPSite site)

void Update()

string Assembly

string Class

Guid ContextCollectionId

Guid ContextEventType

Guid ContextId

int ContextItemId

string ContextItemUrl

Guid ContextObjectId

Guid ContextType

int Credential

string Data

Guid HostId

SPEventHostType HostType

Guid Id

string Name

Guid ParentHostId

SPEventHostType ParentHostType

int SequenceNumber

Guid SiteId

string SolutionHash(2010 中的新增类型)

SPEventReceiverSynchronization Synchronization(2010 中的新增类型)

SPEventReceiverType Type

Guid WebId

SPEventReceiverDefinitionCollection

SPEventReceiverDefinition Add()

SPEventReceiverDefinition Add(Guid Id)

SPEventReceiverDefinition Add(Guid Id, SPList contextList)

SPEventReceiverDefinition Add(Guid Id, SPList contextList)

void Add(SPEventReceiverType receiverType, string assembly, string className)

void CopyTo(SPEventReceiverDefinition[] array, int index)

bool EventReceiverDefinitionExist(Guid eventReceiverId)

int Count

Guid HostId

SPEventHostType HostType

SPEventReceiverDefinition this[Guid eventReceiverId]

SPEventReceiverDefinition this[int index]

int ItemId

SPSite Site

SPWeb Web

SPEventReceiverStatus

n/a

Continue

CancelNoError

CancelWithError

CancelWithRedirectUrl(2010 中的新增类型)

SPEventReceiverSynchronization

(2010 中的新增类型)

n/a

Default(2010 中的新增类型)

Synchronous(2010 中的新增类型)

Asynchronous(2010 中的新增类型)

SPEventReceiverType

n/a

ContextEvent

EmailReceived

FieldAdded

FieldAdding

FieldDeleted

FieldDeleting

FieldUpdated

FieldUpdating

InvalidReceiver

ItemAdded

ItemAdding

ItemAttachmentAdded

ItemAttachmentAdding

ItemAttachmentDeleted

ItemAttachmentDeleting

ItemCheckedIn

ItemCheckedOut

ItemCheckingIn

ItemCheckingOut

ItemDeleted

ItemDeleting

ItemFileConverted

ItemFileMoved

ItemFileMoving

ItemUncheckedOut

ItemUncheckingOut

ItemUpdated

ItemUpdating

ListAdded(2010 中的新增类型)

ListAdding(2010 中的新增类型)

ListDeleted(2010 中的新增类型)

ListDeleting(2010 中的新增类型)

SiteDeleted

SiteDeleting

WebAdding(2010 中的新增类型)

WebDeleted

WebDeleting

WebMoved

WebMoving

WebProvisioned(2010 中的新增类型)

WorkflowCompleted(2010 中的新增类型)

WorkflowPostponed(2010 中的新增类型)

WorkflowStarted(2010 中的新增类型)

WorkflowStarting(2010 中的新增类型)

SPFile

n/a

SPEventReceiverDefinitionCollection EventReceivers

SPItemEventProperties

void Dispose()

SPListItem GetListItemFields(string field1, params string[] fields)(2010 中的新增类型)

void InvalidateListItem()(2010 中的新增类型)

void InvalidateWeb()(2010 中的新增类型)

protected override void MarshalData()(2010 中的新增类型)

SPWeb OpenWeb()

SPItemEventDataCollection AfterProperties

string AfterUrl

SPItemEventDataCollection BeforeProperties

string BeforeUrl

SPEventContext Context

int CurrentUserId

SPList List(2010 中的新增类型)

Guid ListId

SPListItem ListItem

int ListItemId

string ListTitle

string RelativeWebUrl

string UserDisplayName

string UserLoginName

SPWeb Web(2010 中的新增类型)

bool Versionless

string WebUrl

SPUrlZone Zone

SPEventReceiverType EventType(继承自 2010 中的父级)

Guid SiteId(继承自 2010 中的父级)

SPItemEventReceiver

SPItemEventReceiver()

void ContextEvent(SPItemEventProperties properties)

void ItemAdded(SPItemEventProperties properties)

void ItemAdding(SPItemEventProperties properties)

void ItemAttachmentAdded(SPItemEventProperties properties)

void ItemAttachmentAdding(SPItemEventProperties properties)

void ItemAttachmentDeleted(SPItemEventProperties properties)

void ItemAttachmentDeleting(SPItemEventProperties properties)

void ItemCheckedIn(SPItemEventProperties properties)

void ItemCheckedOut(SPItemEventProperties properties)

void ItemCheckingIn(SPItemEventProperties properties)

void ItemCheckingOut(SPItemEventProperties properties)

void ItemDeleted(SPItemEventProperties properties)

void ItemDeleting(SPItemEventProperties properties)

void ItemFileConverted(SPItemEventProperties properties)

void ItemFileMoved(SPItemEventProperties properties)

void ItemFileMoving(SPItemEventProperties properties)

void ItemUncheckedOut(SPItemEventProperties properties)

void ItemUncheckingOut(SPItemEventProperties properties)

void ItemUpdated(SPItemEventProperties properties)

void ItemUpdating(SPItemEventProperties properties)

n/a

SPList

n/a

SPEventReceiverDefinitionCollection EventReceivers

SPListEventProperties

void Dispose()

void InvalidateList()

void InvalidateWeb()

protected override void MarshalData()

Guid FeatureId(2010 中的新增类型)

SPField Field

string FieldName

string FieldXml

SPList List

Guid ListId

string ListTitle

int TemplateId(2010 中的新增类型)

string UserDisplayName

string UserLoginName

SPWeb Web

Guid WebId

string WebUrl

SPItemEventDataCollection AfterProperties

SPEventReceiverType EventType(继承自 2010 中的父级)

Guid SiteId(继承自 2010 中的父级)

SPListEventReceiver

SPListEventReceiver()

void FieldAdded(SPListEventProperties properties)

void FieldAdding(SPListEventProperties properties)

void FieldDeleted(SPListEventProperties properties)

void FieldDeleting(SPListEventProperties properties)

void FieldUpdated(SPListEventProperties properties)

void FieldUpdating(SPListEventProperties properties)

void ListAdded(SPListEventProperties properties)(2010 中的新增类型)

void ListAdding(SPListEventProperties properties)(2010 中的新增类型)

void ListDeleted(SPListEventProperties properties)(2010 中的新增类型)

void ListDeleting(SPListEventProperties properties)(2010 中的新增类型)

n/a

SPListEventType

注意:此类型已在 Microsoft SharePoint Foundation 2010 中标记为"弃用"。

n/a

n/a

SPSite

n/a

SPEventReceiverDefinitionCollection EventReceivers(2010 中的新增类型)

SPWeb

n/a

SPEventReceiverDefinitionCollection EventReceivers

SPWebEventProperties

void Dispose()(2010 中的新增类型)

void InvalidateWeb()(2010 中的新增类型)

protected override void MarshalData()(2010 中的新增类型)

string FullUrl

string NewServerRelativeUrl

Guid ParentWebId(2010 中的新增类型)

string ServerRelativeUrl

string UserDisplayName

string UserLoginName

SPWeb Web

Guid WebId

SPEventReceiverType EventType(继承自 2010 中的父级)

Guid SiteId(继承自 2010 中的父级)

SPWebEventReceiver

SPWebEventReceiver()

void SiteDeleted(SPWebEventProperties properties)

void SiteDeleting(SPWebEventProperties properties)

void WebAdding(SPWebEventProperties properties)(2010 中的新增类型)

void WebDeleted(SPWebEventProperties properties)

void WebDeleting(SPWebEventProperties properties)

void WebMoved(SPWebEventProperties properties)

void WebMoving(SPWebEventProperties properties)

void WebProvisioned(SPWebEventProperties properties)(2010 中的新增类型)

n/a

SPWorkflowEventProperties

(2010 中的新增类型)

protected override void MarshalData()(2010 中的新增类型)

SPWorkflowActivationProperties ActivationProperties(2010 中的新增类型)

string AssociationData(2010 中的新增类型)

SPWorkflowEventCompletionType CompletionType(2010 中的新增类型)

Exception ErrorException(2010 中的新增类型)

SPEventReceiverType EventType(2010 中的新增类型)

string InitiationData(2010 中的新增类型)

SPWorkflowPostponedEventType PostponedEvent(2010 中的新增类型)

int TerminatedByUserId(2010 中的新增类型)

SPWorkflow Workflow(2010 中的新增类型)

StopEventReceiver

StopEventReceiver()

protected bool Stopped

Strings

n/a

EventPropertiesCannotBeChanged

EventReceiverAssemblyNameNull

EventReceiverAssemblyNotInGAC

EventReceiverAsyncBeforeInvalid(2010 中的新增类型)

EventReceiverCancelRequest

EventReceiverClassNameNull

EventReceiverTypeInvalid

EventReceiverWorkflowContextInvalid

InvalidEventReceiverHostType

请参阅

概念

SharePoint 事件、事件接收器和事件宿主表

事件接收器方法比较:Windows SharePoint Services 3.0 和 SharePoint Foundation 2010

其他资源

SharePoint Foundation 2010 中的事件