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
- HWStack.cs
- DataGridViewCell.cs
- XsltOutput.cs
- UnsafeNativeMethods.cs
- RelationshipFixer.cs
- MachineKeyValidationConverter.cs
- XPathMultyIterator.cs
- BaseTreeIterator.cs
- LinearGradientBrush.cs
- ScrollableControl.cs
- DoubleAnimationUsingKeyFrames.cs
- ImageAutomationPeer.cs
- DataGridViewRowsAddedEventArgs.cs
- DSACryptoServiceProvider.cs
- PartialTrustVisibleAssembliesSection.cs
- InternalBufferOverflowException.cs
- MetadataCollection.cs
- COM2IProvidePropertyBuilderHandler.cs
- FactoryId.cs
- AssemblyFilter.cs
- TraceSource.cs
- UriWriter.cs
- SetterBase.cs
- Internal.cs
- Misc.cs
- autovalidator.cs
- DataBindingsDialog.cs
- HandledMouseEvent.cs
- SymDocumentType.cs
- altserialization.cs
- SplitterPanel.cs
- RewritingPass.cs
- HttpPostedFile.cs
- TemplateParser.cs
- Triplet.cs
- ButtonFieldBase.cs
- DBCommand.cs
- PropertyValueUIItem.cs
- RemotingService.cs
- ControlPropertyNameConverter.cs
- OledbConnectionStringbuilder.cs
- FrameworkTextComposition.cs
- PagerStyle.cs
- SqlCacheDependencySection.cs
- Knowncolors.cs
- ToolStrip.cs
- ObjectIDGenerator.cs
- BigInt.cs
- DataGridCaption.cs
- TextAnchor.cs
- ReadOnlyCollection.cs
- MatrixAnimationBase.cs
- SafeNativeMethodsMilCoreApi.cs
- WorkflowViewService.cs
- Visual3D.cs
- ConstructorExpr.cs
- TreeBuilder.cs
- StrokeRenderer.cs
- QueryContext.cs
- Section.cs
- CacheOutputQuery.cs
- XPathAncestorIterator.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- IdentifierElement.cs
- AsymmetricKeyExchangeDeformatter.cs
- TransformPattern.cs
- InvalidProgramException.cs
- TextServicesCompartmentEventSink.cs
- CodeMemberEvent.cs
- RelationshipEndMember.cs
- AsyncResult.cs
- MulticastNotSupportedException.cs
- KoreanCalendar.cs
- Merger.cs
- DesignTimeVisibleAttribute.cs
- UserNameSecurityTokenParameters.cs
- XmlResolver.cs
- NavigationPropertyEmitter.cs
- XmlSchemaSubstitutionGroup.cs
- TableCellCollection.cs
- EdmTypeAttribute.cs
- DynamicDiscoveryDocument.cs
- LicenseContext.cs
- AndAlso.cs
- InkPresenterAutomationPeer.cs
- SelectQueryOperator.cs
- EntityReference.cs
- XMLSyntaxException.cs
- EventTask.cs
- ListCollectionView.cs
- RightNameExpirationInfoPair.cs
- XPathChildIterator.cs
- BigInt.cs
- CodeMethodReturnStatement.cs
- RegexStringValidator.cs
- FacetDescriptionElement.cs
- X509SubjectKeyIdentifierClause.cs
- ErrorInfoXmlDocument.cs
- LogicalCallContext.cs
- EntityTypeBase.cs