Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Data / Microsoft / SqlServer / Server / SqlTriggerContext.cs / 1 / 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;
#if WINFSInternalOnly
internal
#else
public
#endif
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;
#if WINFSInternalOnly
internal
#else
public
#endif
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
- ReaderContextStackData.cs
- SmiMetaDataProperty.cs
- Activity.cs
- GeneralTransform3D.cs
- SQLString.cs
- DataGridTableCollection.cs
- ForEachAction.cs
- SynchronizedPool.cs
- StylusShape.cs
- CaseDesigner.xaml.cs
- ClientEventManager.cs
- WinEventWrap.cs
- TextSelection.cs
- ADMembershipProvider.cs
- TdsParserStateObject.cs
- ShapeTypeface.cs
- AttachedPropertyInfo.cs
- XmlName.cs
- ScalarType.cs
- HyperLinkDesigner.cs
- FillRuleValidation.cs
- TypeDependencyAttribute.cs
- XPathNode.cs
- TimeSpanSecondsConverter.cs
- SelectionEditingBehavior.cs
- DbParameterCollection.cs
- XmlSchemaDocumentation.cs
- DataServiceRequestException.cs
- CallSiteBinder.cs
- DbCommandTree.cs
- UInt16Storage.cs
- AngleUtil.cs
- VersionPair.cs
- JsonFormatWriterGenerator.cs
- SharedDp.cs
- ClrProviderManifest.cs
- ObjectNavigationPropertyMapping.cs
- DbConnectionPoolGroupProviderInfo.cs
- WebPartConnection.cs
- mediaclock.cs
- KnownBoxes.cs
- PropertyGridCommands.cs
- HashLookup.cs
- SQLMoney.cs
- AutomationProperties.cs
- EventLogPermissionEntryCollection.cs
- SiteMapNodeItem.cs
- StoryFragments.cs
- EdmScalarPropertyAttribute.cs
- SchemaSetCompiler.cs
- SmiRequestExecutor.cs
- Propagator.JoinPropagator.cs
- ValueUtilsSmi.cs
- RangeValidator.cs
- TextEditorLists.cs
- XmlSchemaValidationException.cs
- MemberDomainMap.cs
- ListViewItem.cs
- TabItemWrapperAutomationPeer.cs
- HttpProfileGroupBase.cs
- HiddenFieldPageStatePersister.cs
- AssertHelper.cs
- ContextStack.cs
- VirtualPathProvider.cs
- Types.cs
- CompareInfo.cs
- ObjectDataSourceMethodEventArgs.cs
- MetadataException.cs
- ToolBarButtonClickEvent.cs
- MenuTracker.cs
- ImageListStreamer.cs
- CellConstant.cs
- DoubleAnimationBase.cs
- ColumnHeader.cs
- ActivityExecutionFilter.cs
- CodeDomDesignerLoader.cs
- XmlSchemaSimpleContentRestriction.cs
- RawMouseInputReport.cs
- CaseInsensitiveComparer.cs
- PieceNameHelper.cs
- BaseAutoFormat.cs
- TextSelectionProcessor.cs
- _ListenerAsyncResult.cs
- DataGridItem.cs
- IgnoreSectionHandler.cs
- XmlSchemaSet.cs
- DiscoveryInnerClientAdhocCD1.cs
- HttpWebRequestElement.cs
- ElementsClipboardData.cs
- x509store.cs
- DocumentViewerHelper.cs
- IndentTextWriter.cs
- GridProviderWrapper.cs
- Marshal.cs
- FlowDocumentReaderAutomationPeer.cs
- IgnoreDeviceFilterElementCollection.cs
- HttpCapabilitiesBase.cs
- KeyValuePairs.cs
- BinHexEncoder.cs
- SmiEventStream.cs