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
- ExpandCollapseProviderWrapper.cs
- PerfCounters.cs
- QilFactory.cs
- OrderedDictionary.cs
- DataGridRow.cs
- AnimationTimeline.cs
- WorkflowTransactionService.cs
- CodeTypeParameterCollection.cs
- ObjectDataSource.cs
- DiscoveryDocumentSerializer.cs
- translator.cs
- SafeFindHandle.cs
- InertiaRotationBehavior.cs
- StringTraceRecord.cs
- EntityEntry.cs
- ParameterCollection.cs
- ServiceEndpointCollection.cs
- Matrix3DValueSerializer.cs
- TextTrailingWordEllipsis.cs
- LogWriteRestartAreaState.cs
- QilPatternFactory.cs
- TypeCodeDomSerializer.cs
- COAUTHIDENTITY.cs
- DataBindingHandlerAttribute.cs
- AnimationClockResource.cs
- StateWorkerRequest.cs
- WhitespaceRule.cs
- EntityDataSourceWrapper.cs
- ViewgenContext.cs
- GeneralTransform3DTo2D.cs
- ExceptionHelpers.cs
- Permission.cs
- ListViewCommandEventArgs.cs
- DigestComparer.cs
- BackStopAuthenticationModule.cs
- HandlerFactoryWrapper.cs
- DisplayInformation.cs
- ClientScriptManager.cs
- WebPartManager.cs
- Utils.cs
- DEREncoding.cs
- ToolStripDesignerAvailabilityAttribute.cs
- ColorAnimationUsingKeyFrames.cs
- ToolZoneDesigner.cs
- ExtendedPropertiesHandler.cs
- FontUnit.cs
- handlecollector.cs
- WorkflowServiceAttributesTypeConverter.cs
- StrongNameMembershipCondition.cs
- TextCompositionEventArgs.cs
- WebBaseEventKeyComparer.cs
- HashMembershipCondition.cs
- PageBuildProvider.cs
- DataException.cs
- FormViewUpdatedEventArgs.cs
- NotFiniteNumberException.cs
- ListControlStringCollectionEditor.cs
- WebPartConnectionsConfigureVerb.cs
- CodeIdentifiers.cs
- SoapAttributeAttribute.cs
- _AutoWebProxyScriptEngine.cs
- ComponentResourceManager.cs
- _TLSstream.cs
- SelectionChangedEventArgs.cs
- MaskedTextBoxDesigner.cs
- AdapterUtil.cs
- HttpFileCollection.cs
- SoapHttpTransportImporter.cs
- OdbcConnection.cs
- HttpCachePolicyElement.cs
- Calendar.cs
- ListenerPerfCounters.cs
- SizeChangedInfo.cs
- BaseProcessor.cs
- Ticks.cs
- JsonServiceDocumentSerializer.cs
- RC2.cs
- PeerTransportCredentialType.cs
- MorphHelper.cs
- TextTreeFixupNode.cs
- StandardToolWindows.cs
- ToolboxItemAttribute.cs
- DataReaderContainer.cs
- TreeView.cs
- RC2CryptoServiceProvider.cs
- ToolStripSeparatorRenderEventArgs.cs
- WindowsButton.cs
- SystemInfo.cs
- DataGridViewHitTestInfo.cs
- RuntimeTrackingProfile.cs
- MemberHolder.cs
- AlphabeticalEnumConverter.cs
- XmlConvert.cs
- RectValueSerializer.cs
- UpDownEvent.cs
- SortedList.cs
- GlobalId.cs
- COM2PropertyDescriptor.cs
- ErrorWebPart.cs
- VirtualPathProvider.cs