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
- StreamGeometry.cs
- TextRangeEditTables.cs
- EdmToObjectNamespaceMap.cs
- ExportOptions.cs
- AnnouncementInnerClientCD1.cs
- ManualResetEvent.cs
- WmlCalendarAdapter.cs
- ListBoxItemAutomationPeer.cs
- DPTypeDescriptorContext.cs
- RSAOAEPKeyExchangeFormatter.cs
- DependencyProperty.cs
- ObjectIDGenerator.cs
- ExpressionTextBox.xaml.cs
- SubtreeProcessor.cs
- SqlTypesSchemaImporter.cs
- WhiteSpaceTrimStringConverter.cs
- BindingWorker.cs
- SchemaAttDef.cs
- SubMenuStyleCollection.cs
- FunctionParameter.cs
- Token.cs
- OutputScopeManager.cs
- InkCollectionBehavior.cs
- EntityConnectionStringBuilder.cs
- LicenseManager.cs
- SmtpDigestAuthenticationModule.cs
- PersonalizableAttribute.cs
- ComplexTypeEmitter.cs
- UpdateExpressionVisitor.cs
- StringCollection.cs
- ThemeInfoAttribute.cs
- InternalResources.cs
- FixedSOMContainer.cs
- EventEntry.cs
- SvcMapFileSerializer.cs
- XmlSchemaParticle.cs
- WebControl.cs
- CultureSpecificCharacterBufferRange.cs
- GuidTagList.cs
- InputLanguageProfileNotifySink.cs
- StringBlob.cs
- FileDetails.cs
- ConfigurationCollectionAttribute.cs
- NameNode.cs
- PermissionRequestEvidence.cs
- RotateTransform3D.cs
- CapabilitiesUse.cs
- Comparer.cs
- SR.cs
- SecurityKeyEntropyMode.cs
- StorageEndPropertyMapping.cs
- DuplicateWaitObjectException.cs
- MetaModel.cs
- PageBreakRecord.cs
- SamlAttributeStatement.cs
- PersonalizationProviderCollection.cs
- StreamingContext.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- IntPtr.cs
- ConnectionManagementElementCollection.cs
- ArrayElementGridEntry.cs
- EndGetFileNameFromUserRequest.cs
- SplitterEvent.cs
- HtmlElementEventArgs.cs
- DataGridPreparingCellForEditEventArgs.cs
- PropertyGridView.cs
- UpdateException.cs
- BufferedOutputStream.cs
- SigningCredentials.cs
- System.Data_BID.cs
- ServiceNameCollection.cs
- CellPartitioner.cs
- ProcessModuleCollection.cs
- CommandBindingCollection.cs
- RelationshipNavigation.cs
- TextElementAutomationPeer.cs
- EventlogProvider.cs
- FileChangesMonitor.cs
- MarshalByRefObject.cs
- DebugControllerThread.cs
- XmlCharType.cs
- AttributedMetaModel.cs
- CommentEmitter.cs
- SignatureDescription.cs
- CodeDefaultValueExpression.cs
- RequestCachingSection.cs
- DesignerCapabilities.cs
- TableColumnCollectionInternal.cs
- TrustLevel.cs
- XmlNavigatorFilter.cs
- StatusBar.cs
- WindowsTokenRoleProvider.cs
- GridViewColumnHeader.cs
- ProgressBarBrushConverter.cs
- TextServicesLoader.cs
- ObjectDataSourceSelectingEventArgs.cs
- Underline.cs
- precedingquery.cs
- SmtpNegotiateAuthenticationModule.cs
- BaseHashHelper.cs