Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Script.cs
- DataGridCellItemAutomationPeer.cs
- MultiBinding.cs
- SafeCryptHandles.cs
- GeometryDrawing.cs
- BatchStream.cs
- DispatchProxy.cs
- DbConnectionPoolIdentity.cs
- DataGridItem.cs
- ProcessProtocolHandler.cs
- EnumUnknown.cs
- DateTimeConverter2.cs
- ObjectStateFormatter.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- PropertyConverter.cs
- CodeDelegateCreateExpression.cs
- _IPv4Address.cs
- ManagedFilter.cs
- OutputCacheProfileCollection.cs
- URLAttribute.cs
- PluralizationServiceUtil.cs
- SafeEventHandle.cs
- OleDbError.cs
- IChannel.cs
- ReferencedType.cs
- ConstructorNeedsTagAttribute.cs
- ConcurrencyBehavior.cs
- RNGCryptoServiceProvider.cs
- FixedPageStructure.cs
- HandleDictionary.cs
- OrderingInfo.cs
- M3DUtil.cs
- SimpleHandlerBuildProvider.cs
- UITypeEditor.cs
- Pair.cs
- SymbolType.cs
- EventBindingService.cs
- HwndSource.cs
- WorkflowRuntimeBehavior.cs
- CriticalHandle.cs
- FontStyleConverter.cs
- ContentType.cs
- CreateUserWizard.cs
- GroupBoxRenderer.cs
- PrintDialogException.cs
- _IPv4Address.cs
- URI.cs
- ValueOfAction.cs
- IntegrationExceptionEventArgs.cs
- WebPartExportVerb.cs
- BCLDebug.cs
- StringSource.cs
- EntityDataSourceStatementEditor.cs
- InvalidOleVariantTypeException.cs
- cache.cs
- FrugalMap.cs
- AtomParser.cs
- XsdValidatingReader.cs
- LineServicesRun.cs
- FontCacheUtil.cs
- XmlUtilWriter.cs
- SmiGettersStream.cs
- EventLogEntry.cs
- TraceHandler.cs
- HttpProfileGroupBase.cs
- ContractMapping.cs
- AmbientLight.cs
- ExpanderAutomationPeer.cs
- _CookieModule.cs
- SByte.cs
- Page.cs
- keycontainerpermission.cs
- DeclarativeCatalogPart.cs
- ThreadInterruptedException.cs
- UIPropertyMetadata.cs
- InvalidComObjectException.cs
- NotificationContext.cs
- CheckBox.cs
- LoginView.cs
- StringReader.cs
- IndexedGlyphRun.cs
- DataComponentMethodGenerator.cs
- GridViewPageEventArgs.cs
- CalendarDay.cs
- TextAction.cs
- MouseOverProperty.cs
- AsnEncodedData.cs
- MaskedTextBoxTextEditor.cs
- EntityDataSourceQueryBuilder.cs
- TabControlAutomationPeer.cs
- SessionViewState.cs
- Matrix.cs
- RsaKeyIdentifierClause.cs
- XamlBrushSerializer.cs
- FixedStringLookup.cs
- FilteredReadOnlyMetadataCollection.cs
- COM2PropertyDescriptor.cs
- KerberosRequestorSecurityToken.cs
- XNodeSchemaApplier.cs
- QueryOutputWriter.cs