Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ExtendedPropertyDescriptor.cs
- PrePostDescendentsWalker.cs
- WindowsListViewSubItem.cs
- MaskedTextProvider.cs
- COMException.cs
- ItemsPresenter.cs
- TripleDES.cs
- CompModSwitches.cs
- ContentFileHelper.cs
- CustomAttributeFormatException.cs
- InputScopeManager.cs
- WebControlsSection.cs
- AuthenticateEventArgs.cs
- ZipIOExtraFieldPaddingElement.cs
- Parameter.cs
- PerformanceCounterPermissionEntry.cs
- TargetInvocationException.cs
- IPipelineRuntime.cs
- ClosureBinding.cs
- AuthenticateEventArgs.cs
- FormClosedEvent.cs
- FixedSOMPageElement.cs
- TreeChangeInfo.cs
- KeyGesture.cs
- HtmlControl.cs
- ObjectDataSourceEventArgs.cs
- StructuredType.cs
- CompilationUtil.cs
- ArrangedElement.cs
- RelationshipFixer.cs
- ToolStripPanelCell.cs
- ThicknessAnimation.cs
- XAMLParseException.cs
- ControlParser.cs
- LineGeometry.cs
- DataQuery.cs
- DataGridViewCellValueEventArgs.cs
- WebPartMovingEventArgs.cs
- _ChunkParse.cs
- AccessibleObject.cs
- ToolStripSystemRenderer.cs
- MouseActionConverter.cs
- AuthenticationServiceManager.cs
- InvalidOleVariantTypeException.cs
- BindingMemberInfo.cs
- DiffuseMaterial.cs
- FormsIdentity.cs
- VisualTreeHelper.cs
- ObjectDataSourceDisposingEventArgs.cs
- WebPartEventArgs.cs
- ConcurrencyMode.cs
- TdsParameterSetter.cs
- remotingproxy.cs
- _Events.cs
- ErrorFormatterPage.cs
- JavascriptCallbackBehaviorAttribute.cs
- RepeatBehaviorConverter.cs
- DescendantOverDescendantQuery.cs
- DataStorage.cs
- CounterSample.cs
- TreeNodeStyleCollection.cs
- DataSourceCache.cs
- QuestionEventArgs.cs
- nulltextcontainer.cs
- ExpressionNormalizer.cs
- PathTooLongException.cs
- StrokeCollection.cs
- WorkflowQueuingService.cs
- WinEventQueueItem.cs
- WindowsAuthenticationEventArgs.cs
- DataGridTablesFactory.cs
- CaseCqlBlock.cs
- ThrowHelper.cs
- GridViewDeletedEventArgs.cs
- FileDialogCustomPlace.cs
- CqlBlock.cs
- HttpDebugHandler.cs
- RTLAwareMessageBox.cs
- RangeValidator.cs
- Rect3DConverter.cs
- AdornedElementPlaceholder.cs
- SessionStateSection.cs
- PackagePartCollection.cs
- DataGridRelationshipRow.cs
- StrongBox.cs
- SharedTcpTransportManager.cs
- UrlAuthFailedErrorFormatter.cs
- CustomCategoryAttribute.cs
- cookie.cs
- WebPartTransformerAttribute.cs
- APCustomTypeDescriptor.cs
- StringToken.cs
- ListViewEditEventArgs.cs
- ImageSource.cs
- ScrollEvent.cs
- ValueOfAction.cs
- Baml2006KnownTypes.cs
- MsmqHostedTransportConfiguration.cs
- UpdateEventArgs.cs
- MaterialGroup.cs