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
- TableItemProviderWrapper.cs
- Container.cs
- ModelUIElement3D.cs
- AnnotationResourceChangedEventArgs.cs
- EditorPartChrome.cs
- PieceDirectory.cs
- Knowncolors.cs
- SqlDataSourceView.cs
- RecordBuilder.cs
- BypassElementCollection.cs
- SqlCacheDependency.cs
- SkipStoryboardToFill.cs
- AudioDeviceOut.cs
- ToolStripDesigner.cs
- SimpleBitVector32.cs
- XmlNodeReader.cs
- BinaryObjectInfo.cs
- EntryPointNotFoundException.cs
- BitmapImage.cs
- CalloutQueueItem.cs
- DiscoveryReferences.cs
- AnnotationDocumentPaginator.cs
- PassportAuthenticationModule.cs
- InkPresenter.cs
- loginstatus.cs
- DependencyPropertyHelper.cs
- _AutoWebProxyScriptEngine.cs
- SqlTypeSystemProvider.cs
- StatementContext.cs
- Point3DKeyFrameCollection.cs
- SimpleBitVector32.cs
- StaticFileHandler.cs
- ProviderUtil.cs
- FontStyles.cs
- ICollection.cs
- CultureInfo.cs
- HelloOperationCD1AsyncResult.cs
- _SSPIWrapper.cs
- AggregationMinMaxHelpers.cs
- XPathNodeList.cs
- EastAsianLunisolarCalendar.cs
- XslTransform.cs
- MissingManifestResourceException.cs
- UnaryQueryOperator.cs
- DesignParameter.cs
- BlurBitmapEffect.cs
- DynamicQueryableWrapper.cs
- SafeTimerHandle.cs
- LicenseProviderAttribute.cs
- RuntimeWrappedException.cs
- StringDictionary.cs
- DockPanel.cs
- CompilationSection.cs
- RichTextBox.cs
- RadialGradientBrush.cs
- TextSearch.cs
- DateTimeConstantAttribute.cs
- EntitySetBase.cs
- DocumentReferenceCollection.cs
- DataObjectAttribute.cs
- DesignerActionVerbItem.cs
- WindowsGraphics.cs
- PropertyGroupDescription.cs
- GridViewPageEventArgs.cs
- ImageButton.cs
- DataGridLinkButton.cs
- TargetConverter.cs
- ToolStripDropDownButton.cs
- NavigationEventArgs.cs
- ButtonAutomationPeer.cs
- SqlServer2KCompatibilityCheck.cs
- XmlReader.cs
- XsdValidatingReader.cs
- LogStore.cs
- CompilerWrapper.cs
- QilPatternVisitor.cs
- HierarchicalDataBoundControlAdapter.cs
- DecimalFormatter.cs
- SoapTypeAttribute.cs
- HotSpot.cs
- ComponentRenameEvent.cs
- DataBindingCollectionConverter.cs
- OutputCacheSettingsSection.cs
- FlowSwitchLink.cs
- ScrollPatternIdentifiers.cs
- odbcmetadatafactory.cs
- ManagementOperationWatcher.cs
- ControlValuePropertyAttribute.cs
- ControlBuilder.cs
- SchemaImporterExtensionElementCollection.cs
- DataRecord.cs
- MetadataUtilsSmi.cs
- KeyBinding.cs
- NavigationService.cs
- BitmapEffectDrawing.cs
- ToolStripItemEventArgs.cs
- KeyPressEvent.cs
- ChannelServices.cs
- PublisherMembershipCondition.cs
- EventLogEntryCollection.cs