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
- StrongTypingException.cs
- AsyncSerializedWorker.cs
- StronglyTypedResourceBuilder.cs
- ProxyHelper.cs
- CharEnumerator.cs
- Thread.cs
- ActivityTypeResolver.xaml.cs
- TypeCollectionPropertyEditor.cs
- GeometryCollection.cs
- AttachedAnnotationChangedEventArgs.cs
- BitmapEffectInput.cs
- FileSecurity.cs
- IIS7WorkerRequest.cs
- SystemWebSectionGroup.cs
- safemediahandle.cs
- XmlSignatureManifest.cs
- CodeChecksumPragma.cs
- KeyFrames.cs
- ToolStripMenuItem.cs
- HiddenFieldDesigner.cs
- MasterPageParser.cs
- counter.cs
- SessionPageStateSection.cs
- BindingGroup.cs
- VarRemapper.cs
- StringAttributeCollection.cs
- ScrollChangedEventArgs.cs
- ZipIOExtraField.cs
- SchemaInfo.cs
- MailAddressCollection.cs
- HtmlLiteralTextAdapter.cs
- StrokeCollection2.cs
- DBConcurrencyException.cs
- ProviderManager.cs
- DifferencingCollection.cs
- RawStylusSystemGestureInputReport.cs
- COM2IProvidePropertyBuilderHandler.cs
- HandleCollector.cs
- TextSelectionProcessor.cs
- AuthenticatingEventArgs.cs
- DataBoundControlAdapter.cs
- CompensationHandlingFilter.cs
- SqlDependency.cs
- CallbackCorrelationInitializer.cs
- TextShapeableCharacters.cs
- Logging.cs
- WorkflowElementDialog.cs
- Animatable.cs
- FlowDocumentPaginator.cs
- DelegatingMessage.cs
- Relationship.cs
- SqlFormatter.cs
- RoleGroup.cs
- HashMembershipCondition.cs
- StandardCommandToolStripMenuItem.cs
- DebugView.cs
- OrderedEnumerableRowCollection.cs
- controlskin.cs
- SchemaSetCompiler.cs
- AuthenticationService.cs
- XmlBindingWorker.cs
- MissingFieldException.cs
- RbTree.cs
- Byte.cs
- SchemaNamespaceManager.cs
- EditingCoordinator.cs
- ValidatorCompatibilityHelper.cs
- DataSourceCache.cs
- ObjectConverter.cs
- Identity.cs
- CanonicalFormWriter.cs
- DefaultWorkflowSchedulerService.cs
- MsmqChannelFactory.cs
- _PooledStream.cs
- ComponentEditorPage.cs
- EpmCustomContentWriterNodeData.cs
- TileModeValidation.cs
- Quad.cs
- DataGridHeaderBorder.cs
- Variant.cs
- PageBreakRecord.cs
- ComContractElement.cs
- XmlCountingReader.cs
- RegexMatchCollection.cs
- ProtocolViolationException.cs
- DataGridItemEventArgs.cs
- MarkupExtensionReturnTypeAttribute.cs
- HttpContextWrapper.cs
- SqlDataSourceCache.cs
- DataListComponentEditor.cs
- MetadataUtilsSmi.cs
- FacetChecker.cs
- DefaultObjectMappingItemCollection.cs
- StrokeNodeData.cs
- ServiceElement.cs
- COM2ColorConverter.cs
- EntitySqlException.cs
- NetNamedPipeSecurityMode.cs
- PropertyDescriptorCollection.cs
- CompiledAction.cs