Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / Microsoft / SqlServer / Server / SqlTriggerContext.cs / 1305376 / SqlTriggerContext.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
// daltodov
//-----------------------------------------------------------------------------
namespace Microsoft.SqlServer.Server {
using System.Data.Common;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Diagnostics;
public sealed class SqlTriggerContext {
TriggerAction _triggerAction;
bool[] _columnsUpdated;
SqlXml _eventInstanceData;
internal SqlTriggerContext(TriggerAction triggerAction, bool[] columnsUpdated, SqlXml eventInstanceData) {
_triggerAction = triggerAction;
_columnsUpdated = columnsUpdated;
_eventInstanceData = eventInstanceData;
}
public int ColumnCount {
get {
int result = 0;
if (null != _columnsUpdated) {
result = _columnsUpdated.Length;
}
return result;
}
}
public SqlXml EventData {
get {
return _eventInstanceData;
}
}
public TriggerAction TriggerAction {
get {
return _triggerAction;
}
}
public bool IsUpdatedColumn(int columnOrdinal) {
if (null != _columnsUpdated) {
return _columnsUpdated[columnOrdinal]; // will throw IndexOutOfRangeException if it's out of range...
}
throw ADP.IndexOutOfRange(columnOrdinal); // if there aren't any columns, that means IndexOutOfRange too...
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
// daltodov
//-----------------------------------------------------------------------------
namespace Microsoft.SqlServer.Server {
using System.Data.Common;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Diagnostics;
public sealed class SqlTriggerContext {
TriggerAction _triggerAction;
bool[] _columnsUpdated;
SqlXml _eventInstanceData;
internal SqlTriggerContext(TriggerAction triggerAction, bool[] columnsUpdated, SqlXml eventInstanceData) {
_triggerAction = triggerAction;
_columnsUpdated = columnsUpdated;
_eventInstanceData = eventInstanceData;
}
public int ColumnCount {
get {
int result = 0;
if (null != _columnsUpdated) {
result = _columnsUpdated.Length;
}
return result;
}
}
public SqlXml EventData {
get {
return _eventInstanceData;
}
}
public TriggerAction TriggerAction {
get {
return _triggerAction;
}
}
public bool IsUpdatedColumn(int columnOrdinal) {
if (null != _columnsUpdated) {
return _columnsUpdated[columnOrdinal]; // will throw IndexOutOfRangeException if it's out of range...
}
throw ADP.IndexOutOfRange(columnOrdinal); // if there aren't any columns, that means IndexOutOfRange too...
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InstanceHandle.cs
- SqlTriggerAttribute.cs
- DocComment.cs
- FontDialog.cs
- EqualityComparer.cs
- DebugManager.cs
- HtmlUtf8RawTextWriter.cs
- httpserverutility.cs
- StreamProxy.cs
- SecureUICommand.cs
- DataGridViewRowsAddedEventArgs.cs
- EventLogSession.cs
- Win32PrintDialog.cs
- GlobalizationSection.cs
- IntSecurity.cs
- DependencyObjectType.cs
- HttpCapabilitiesSectionHandler.cs
- Color.cs
- SecurityUtils.cs
- StorageBasedPackageProperties.cs
- SqlErrorCollection.cs
- CustomErrorsSectionWrapper.cs
- PropertyInformation.cs
- SapiAttributeParser.cs
- _FtpDataStream.cs
- ToolStripButton.cs
- FieldInfo.cs
- EpmContentDeSerializerBase.cs
- HtmlInputFile.cs
- CustomSignedXml.cs
- HtmlInputPassword.cs
- DataFormats.cs
- XmlSubtreeReader.cs
- HwndProxyElementProvider.cs
- ArrayEditor.cs
- ResXDataNode.cs
- ToolStripRendererSwitcher.cs
- DataSourceCacheDurationConverter.cs
- PeerCollaboration.cs
- ItemList.cs
- DynamicAttribute.cs
- LabelAutomationPeer.cs
- PinnedBufferMemoryStream.cs
- Timer.cs
- EndpointInfo.cs
- XPathDocumentBuilder.cs
- RtfControls.cs
- RPIdentityRequirement.cs
- UserControlDocumentDesigner.cs
- precedingsibling.cs
- RegistryDataKey.cs
- DescriptionAttribute.cs
- TypeResolvingOptions.cs
- DirectoryNotFoundException.cs
- NameValuePermission.cs
- AttributeProviderAttribute.cs
- basemetadatamappingvisitor.cs
- TransformCollection.cs
- ItemCollection.cs
- GridItemCollection.cs
- VScrollProperties.cs
- UserMapPath.cs
- AnonymousIdentificationModule.cs
- ExceptionUtil.cs
- ZoomComboBox.cs
- ProfileBuildProvider.cs
- EntityDataSourceContextDisposingEventArgs.cs
- DataViewSetting.cs
- Binding.cs
- LeafCellTreeNode.cs
- AutomationElementIdentifiers.cs
- InvalidPrinterException.cs
- BindingList.cs
- IDQuery.cs
- SafeLibraryHandle.cs
- DocumentGridPage.cs
- PlainXmlDeserializer.cs
- XmlObjectSerializerWriteContextComplex.cs
- NativeMethods.cs
- MultipartContentParser.cs
- InvalidFilterCriteriaException.cs
- LogArchiveSnapshot.cs
- ProfileSettings.cs
- SplitterCancelEvent.cs
- ProtocolViolationException.cs
- ScrollChrome.cs
- __TransparentProxy.cs
- HttpHandlerActionCollection.cs
- ProxyWebPart.cs
- ImageResources.Designer.cs
- MimePart.cs
- ILGen.cs
- HttpRawResponse.cs
- HyperLinkStyle.cs
- MatrixValueSerializer.cs
- VarInfo.cs
- SchemaElementDecl.cs
- CommonProperties.cs
- TextSelectionHighlightLayer.cs
- WinFormsSpinner.cs