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
- ImmutablePropertyDescriptorGridEntry.cs
- MainMenu.cs
- WindowsEditBox.cs
- TiffBitmapEncoder.cs
- HashAlgorithm.cs
- CodeDomSerializerException.cs
- UIPermission.cs
- CultureMapper.cs
- AuthorizationRuleCollection.cs
- StreamInfo.cs
- SelfIssuedSamlTokenFactory.cs
- BamlWriter.cs
- OpenTypeLayout.cs
- PropertySourceInfo.cs
- PerformanceCounterPermissionAttribute.cs
- RegistrySecurity.cs
- SamlSecurityTokenAuthenticator.cs
- NavigationHelper.cs
- FlagPanel.cs
- SymDocumentType.cs
- DSASignatureDeformatter.cs
- SettingsAttributes.cs
- BitmapEffectGroup.cs
- TextViewElement.cs
- RawAppCommandInputReport.cs
- XmlArrayItemAttributes.cs
- NetStream.cs
- Win32SafeHandles.cs
- ExpressionConverter.cs
- SchemaTypeEmitter.cs
- mediaclock.cs
- SamlAuthorizationDecisionStatement.cs
- IdentitySection.cs
- UserControlAutomationPeer.cs
- TreeViewAutomationPeer.cs
- RequestNavigateEventArgs.cs
- ConfigurationSectionCollection.cs
- FileRecordSequenceHelper.cs
- ZipIOLocalFileBlock.cs
- HttpRawResponse.cs
- _TransmitFileOverlappedAsyncResult.cs
- COM2Enum.cs
- AssemblyInfo.cs
- XmlElementAttribute.cs
- DeadCharTextComposition.cs
- ServerProtocol.cs
- SafeCertificateStore.cs
- ValidateNames.cs
- StylusButton.cs
- ResourceDictionary.cs
- WindowsRichEdit.cs
- SqlAliasesReferenced.cs
- ClientEventManager.cs
- PerfCounters.cs
- XmlSerializationWriter.cs
- UIAgentInitializationException.cs
- SystemMulticastIPAddressInformation.cs
- DefaultTextStore.cs
- PanelStyle.cs
- CodeIndexerExpression.cs
- ActiveDocumentEvent.cs
- DefaultEvaluationContext.cs
- Control.cs
- EntityDataSource.cs
- WizardForm.cs
- SettingsPropertyNotFoundException.cs
- WebPartManager.cs
- CurrencyManager.cs
- DataGridViewColumnTypeEditor.cs
- RedirectionProxy.cs
- ToolTip.cs
- ProxyWebPart.cs
- ApplicationId.cs
- ScriptControl.cs
- StatusBarItemAutomationPeer.cs
- CodeTypeReferenceExpression.cs
- ValidationErrorEventArgs.cs
- SamlAttribute.cs
- TopClause.cs
- PathFigureCollection.cs
- SQLDecimal.cs
- DataTableTypeConverter.cs
- DataErrorValidationRule.cs
- PartDesigner.cs
- SystemTcpConnection.cs
- GreenMethods.cs
- WebPartConnectionsCancelEventArgs.cs
- _ProxyChain.cs
- DoubleUtil.cs
- DiffuseMaterial.cs
- MetaDataInfo.cs
- SQLBinary.cs
- CodeTypeOfExpression.cs
- SqlEnums.cs
- EditorAttribute.cs
- NativeMethods.cs
- FixedDocument.cs
- KnownTypesHelper.cs
- EventSourceCreationData.cs
- BaseInfoTable.cs