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
- WebBrowsableAttribute.cs
- ExecutionContext.cs
- SizeLimitedCache.cs
- DataGridTableCollection.cs
- MarshalDirectiveException.cs
- WebPermission.cs
- NumericUpDownAccelerationCollection.cs
- TrackingServices.cs
- XsdBuilder.cs
- DeclaredTypeElement.cs
- CodeTypeReferenceCollection.cs
- LogRestartAreaEnumerator.cs
- SafeRightsManagementEnvironmentHandle.cs
- SystemIPInterfaceStatistics.cs
- RuntimeConfigLKG.cs
- OdbcInfoMessageEvent.cs
- ObjectDataSourceSelectingEventArgs.cs
- ObjectFullSpanRewriter.cs
- DecryptedHeader.cs
- FilterRepeater.cs
- Parser.cs
- DockAndAnchorLayout.cs
- ClientTargetCollection.cs
- keycontainerpermission.cs
- AddressAccessDeniedException.cs
- DatePickerAutomationPeer.cs
- HostExecutionContextManager.cs
- SynchronizedDispatch.cs
- FrameSecurityDescriptor.cs
- QueryContinueDragEvent.cs
- ConfigurationCollectionAttribute.cs
- FtpCachePolicyElement.cs
- SmtpTransport.cs
- SamlAttributeStatement.cs
- OlePropertyStructs.cs
- InlinedAggregationOperatorEnumerator.cs
- IOThreadTimer.cs
- ListMarkerSourceInfo.cs
- CompModSwitches.cs
- DependencyPropertyConverter.cs
- TypeForwardedToAttribute.cs
- GridItem.cs
- XmlUtil.cs
- TransformProviderWrapper.cs
- SqlParameter.cs
- DataServiceQuery.cs
- AutomationPeer.cs
- PerformanceCounter.cs
- CompiledIdentityConstraint.cs
- SynchronizationLockException.cs
- SqlInternalConnectionSmi.cs
- DiscoveryServerProtocol.cs
- FileIOPermission.cs
- PenThreadPool.cs
- DragEvent.cs
- PropertyGridView.cs
- DesignerCommandSet.cs
- HttpRuntime.cs
- NetWebProxyFinder.cs
- ContextStaticAttribute.cs
- SHA1Managed.cs
- ProfileEventArgs.cs
- VectorCollectionConverter.cs
- WindowsPen.cs
- DependsOnAttribute.cs
- ConfigurationStrings.cs
- PrivateFontCollection.cs
- ButtonRenderer.cs
- TakeOrSkipQueryOperator.cs
- OwnerDrawPropertyBag.cs
- FilterableAttribute.cs
- ListArgumentProvider.cs
- SuppressMessageAttribute.cs
- UidManager.cs
- ColorTransformHelper.cs
- PreloadedPackages.cs
- ReceiveMessageContent.cs
- FilteredDataSetHelper.cs
- WhitespaceRuleLookup.cs
- AdornerHitTestResult.cs
- FamilyMap.cs
- TraceUtility.cs
- SqlClientWrapperSmiStream.cs
- PolicyException.cs
- DescendantOverDescendantQuery.cs
- SubqueryTrackingVisitor.cs
- TextParagraphCache.cs
- AsyncPostBackErrorEventArgs.cs
- XpsFilter.cs
- ToolStripItem.cs
- FileCodeGroup.cs
- SoapReflectionImporter.cs
- PropertyValueUIItem.cs
- PackUriHelper.cs
- ThousandthOfEmRealDoubles.cs
- DebugHandleTracker.cs
- ObfuscationAttribute.cs
- DataGridViewMethods.cs
- ArrayConverter.cs
- XmlTypeAttribute.cs