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
- MessagePartSpecification.cs
- SpecialTypeDataContract.cs
- QueryableFilterRepeater.cs
- WmfPlaceableFileHeader.cs
- Point3DKeyFrameCollection.cs
- DmlSqlGenerator.cs
- MetadataItemEmitter.cs
- HttpHandlerAction.cs
- prefixendpointaddressmessagefiltertable.cs
- SplashScreenNativeMethods.cs
- FileDetails.cs
- LoadedEvent.cs
- ConfigurationPermission.cs
- XpsImageSerializationService.cs
- GridViewRowPresenterBase.cs
- PagesChangedEventArgs.cs
- DbMetaDataFactory.cs
- ContentValidator.cs
- HtmlHistory.cs
- coordinator.cs
- InfoCardKeyedHashAlgorithm.cs
- SecUtil.cs
- Compensate.cs
- FontFamily.cs
- RawMouseInputReport.cs
- ServiceOperation.cs
- ReliableInputConnection.cs
- EngineSite.cs
- WorkflowApplicationTerminatedException.cs
- ClientSideProviderDescription.cs
- DataSourceView.cs
- ExtensionDataObject.cs
- Mutex.cs
- oledbconnectionstring.cs
- MultilineStringConverter.cs
- _HeaderInfoTable.cs
- CodeComment.cs
- VisualBasicValue.cs
- AlgoModule.cs
- ChtmlImageAdapter.cs
- EventLogStatus.cs
- SizeConverter.cs
- XmlSerializerAssemblyAttribute.cs
- DecoderReplacementFallback.cs
- PhonemeConverter.cs
- DataGridViewBand.cs
- CompensationTokenData.cs
- ImageDesigner.cs
- FormatVersion.cs
- InvalidCastException.cs
- RC2.cs
- DBParameter.cs
- DeclarativeCatalogPart.cs
- NullableDoubleMinMaxAggregationOperator.cs
- IssuanceLicense.cs
- MarkerProperties.cs
- PropertyNames.cs
- FixedFindEngine.cs
- DesignSurfaceCollection.cs
- ObjectReaderCompiler.cs
- DbDataReader.cs
- ManagementOperationWatcher.cs
- DesignerVerb.cs
- TypeRestriction.cs
- FixedSOMContainer.cs
- ISCIIEncoding.cs
- InOutArgumentConverter.cs
- PopOutPanel.cs
- SystemIPAddressInformation.cs
- DataViewManager.cs
- WeakReference.cs
- WebMessageFormatHelper.cs
- SimpleApplicationHost.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- ConfigXmlAttribute.cs
- ImageListUtils.cs
- Stack.cs
- SmtpNegotiateAuthenticationModule.cs
- ClientFormsIdentity.cs
- KerberosSecurityTokenAuthenticator.cs
- ConfigurationElement.cs
- GradientStopCollection.cs
- SqlEnums.cs
- xmlfixedPageInfo.cs
- SynchronousChannelMergeEnumerator.cs
- BoundColumn.cs
- BufferedOutputStream.cs
- BindingListCollectionView.cs
- Zone.cs
- MyContact.cs
- WindowsSolidBrush.cs
- Reference.cs
- _ConnectionGroup.cs
- MappingModelBuildProvider.cs
- PerformanceCounters.cs
- DefaultSerializationProviderAttribute.cs
- BinaryCommonClasses.cs
- ArraySet.cs
- ArgumentException.cs
- AutomationInteropProvider.cs