Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- InstanceData.cs
- MeshGeometry3D.cs
- Fonts.cs
- StorageConditionPropertyMapping.cs
- SelectManyQueryOperator.cs
- DatePicker.cs
- NavigationWindowAutomationPeer.cs
- ExpressionSelection.cs
- LockCookie.cs
- COMException.cs
- RawStylusInputReport.cs
- __TransparentProxy.cs
- XmlSchemaSequence.cs
- ZoneLinkButton.cs
- SecurityResources.cs
- PanelStyle.cs
- Scalars.cs
- DelayedRegex.cs
- CheckoutException.cs
- listviewsubitemcollectioneditor.cs
- Component.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- ToolboxComponentsCreatedEventArgs.cs
- AutomationElementIdentifiers.cs
- APCustomTypeDescriptor.cs
- KnowledgeBase.cs
- TableDetailsCollection.cs
- CodeSubDirectory.cs
- BaseAsyncResult.cs
- RoleService.cs
- DataGridViewCellStateChangedEventArgs.cs
- HttpRuntime.cs
- DataGridViewColumnCollection.cs
- ImportCatalogPart.cs
- DurationConverter.cs
- ProxyHelper.cs
- GifBitmapEncoder.cs
- SafeTokenHandle.cs
- ImageMap.cs
- ThousandthOfEmRealDoubles.cs
- XmlSchemaComplexContentExtension.cs
- SelectedCellsChangedEventArgs.cs
- ElementProxy.cs
- ControlCollection.cs
- Brush.cs
- IndentedWriter.cs
- PrintEvent.cs
- RootNamespaceAttribute.cs
- StateValidator.cs
- RijndaelManagedTransform.cs
- SystemInfo.cs
- OutArgument.cs
- BrowserCapabilitiesFactoryBase.cs
- Transform3D.cs
- VectorKeyFrameCollection.cs
- Action.cs
- SourceInterpreter.cs
- AutomationPeer.cs
- AuthenticationModuleElementCollection.cs
- RectAnimationClockResource.cs
- FunctionDefinition.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- ThreadExceptionEvent.cs
- SafeRegistryHandle.cs
- SymbolPair.cs
- GroupedContextMenuStrip.cs
- ParallelQuery.cs
- StringFunctions.cs
- InvokeProviderWrapper.cs
- ToolStripSplitButton.cs
- Enlistment.cs
- OdbcParameterCollection.cs
- CssTextWriter.cs
- ParallelDesigner.cs
- XPathSelfQuery.cs
- TableDetailsCollection.cs
- controlskin.cs
- DataGridViewHitTestInfo.cs
- DeobfuscatingStream.cs
- BaseTemplateBuildProvider.cs
- PostBackTrigger.cs
- WebHttpBinding.cs
- FigureParaClient.cs
- HatchBrush.cs
- ViewLoader.cs
- NativeMethods.cs
- ValidationRuleCollection.cs
- WebControlAdapter.cs
- ProxyGenerator.cs
- StrongNameUtility.cs
- Rule.cs
- TextElementAutomationPeer.cs
- HttpServerVarsCollection.cs
- SoapConverter.cs
- DeleteIndexBinder.cs
- Selection.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- _ScatterGatherBuffers.cs
- CapabilitiesSection.cs
- PatternMatcher.cs