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
- MethodAccessException.cs
- GridViewRow.cs
- CompoundFileIOPermission.cs
- Int64Converter.cs
- CommandDevice.cs
- TransportSecurityProtocolFactory.cs
- RsaSecurityTokenAuthenticator.cs
- ThemeableAttribute.cs
- versioninfo.cs
- ArgIterator.cs
- WindowsAuthenticationModule.cs
- ScopelessEnumAttribute.cs
- ErrorLog.cs
- GradientStopCollection.cs
- SqlDuplicator.cs
- TextEditorSelection.cs
- WebScriptServiceHostFactory.cs
- SByteConverter.cs
- DebugView.cs
- DocumentViewerBase.cs
- AuthenticationModulesSection.cs
- PeerInvitationResponse.cs
- PartialCachingAttribute.cs
- MenuItemStyle.cs
- ZipIOCentralDirectoryFileHeader.cs
- InvokeCompletedEventArgs.cs
- WebPartRestoreVerb.cs
- XmlSchemaSimpleContentExtension.cs
- PackagePartCollection.cs
- TaskbarItemInfo.cs
- UInt16Storage.cs
- ReflectTypeDescriptionProvider.cs
- DeferredElementTreeState.cs
- ScriptComponentDescriptor.cs
- MachineSettingsSection.cs
- OdbcHandle.cs
- QueueProcessor.cs
- DataRowCollection.cs
- KeyValuePairs.cs
- DBSchemaTable.cs
- AssemblyContextControlItem.cs
- CellParaClient.cs
- FaultHandlingFilter.cs
- CheckBox.cs
- TouchesOverProperty.cs
- NotificationContext.cs
- TreeView.cs
- CodeEventReferenceExpression.cs
- xml.cs
- Trigger.cs
- WebEventTraceProvider.cs
- ExpressionEditor.cs
- SHA1.cs
- GeneralTransform.cs
- FilterableAttribute.cs
- StrokeCollection.cs
- RouteParametersHelper.cs
- CapabilitiesState.cs
- StructureChangedEventArgs.cs
- EFDataModelProvider.cs
- LoginCancelEventArgs.cs
- GradientBrush.cs
- ISessionStateStore.cs
- Set.cs
- SynchronizedDispatch.cs
- IPPacketInformation.cs
- PrintPreviewGraphics.cs
- EntityCommandDefinition.cs
- SerializationSectionGroup.cs
- PropertyBuilder.cs
- MarkerProperties.cs
- EventSourceCreationData.cs
- RealizationContext.cs
- TagMapInfo.cs
- CommentEmitter.cs
- PropertyCollection.cs
- SelectedDatesCollection.cs
- WindowsListBox.cs
- SecurityManager.cs
- ErrorFormatterPage.cs
- CreateUserErrorEventArgs.cs
- RelatedImageListAttribute.cs
- NaturalLanguageHyphenator.cs
- TabPageDesigner.cs
- Task.cs
- TransactionsSectionGroup.cs
- WindowsMenu.cs
- ExtensibleClassFactory.cs
- FrameworkContextData.cs
- ContextInformation.cs
- NullableLongMinMaxAggregationOperator.cs
- ContainerCodeDomSerializer.cs
- EntityContainerEntitySet.cs
- TextDocumentView.cs
- BufferedGraphics.cs
- WebBrowserNavigatedEventHandler.cs
- TextTreeNode.cs
- InputLanguageCollection.cs
- XmlDomTextWriter.cs
- MethodBuilder.cs