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
- ISAPIRuntime.cs
- graph.cs
- StateWorkerRequest.cs
- itemelement.cs
- ApplicationCommands.cs
- DashStyles.cs
- Rules.cs
- StructuralType.cs
- LambdaCompiler.Expressions.cs
- PromptBuilder.cs
- Descriptor.cs
- mediaclock.cs
- RangeContentEnumerator.cs
- SemanticBasicElement.cs
- __Filters.cs
- ValidationSummary.cs
- ValidatingPropertiesEventArgs.cs
- LineServicesCallbacks.cs
- LogicalExpressionTypeConverter.cs
- ListItem.cs
- SchemaCollectionCompiler.cs
- ZipIOExtraFieldElement.cs
- CapabilitiesAssignment.cs
- Utils.cs
- SkipStoryboardToFill.cs
- SafeBitVector32.cs
- XmlDocumentType.cs
- ToolStripButton.cs
- PerformanceCounterLib.cs
- DelegatingTypeDescriptionProvider.cs
- XpsDocument.cs
- ApplicationSecurityManager.cs
- CachedRequestParams.cs
- ClientSideQueueItem.cs
- ProgressBarRenderer.cs
- ResourcesGenerator.cs
- EventBuilder.cs
- PenLineJoinValidation.cs
- ReaderWriterLockSlim.cs
- TreeViewCancelEvent.cs
- SoapExtensionTypeElementCollection.cs
- RandomNumberGenerator.cs
- WebPartAddingEventArgs.cs
- ProvidersHelper.cs
- SqlCacheDependencySection.cs
- DoWhileDesigner.xaml.cs
- FillErrorEventArgs.cs
- SingleConverter.cs
- CommunicationException.cs
- SwitchLevelAttribute.cs
- ChooseAction.cs
- SqlUnionizer.cs
- ServicesUtilities.cs
- GeometryCollection.cs
- MimeParameters.cs
- AttachInfo.cs
- EntityDataSourceUtil.cs
- ItemMap.cs
- versioninfo.cs
- PeerEndPoint.cs
- MemberCollection.cs
- X509Extension.cs
- SoapClientMessage.cs
- SignatureResourceHelper.cs
- DataSource.cs
- SubMenuStyle.cs
- OrthographicCamera.cs
- TraceContextEventArgs.cs
- Guid.cs
- MissingMethodException.cs
- SynchronizationLockException.cs
- ArrayWithOffset.cs
- RelationshipManager.cs
- CodeDOMUtility.cs
- NativeMethods.cs
- ResXFileRef.cs
- PopupControlService.cs
- LockCookie.cs
- IdentitySection.cs
- SqlInfoMessageEvent.cs
- WebPart.cs
- ProtocolInformationWriter.cs
- RowBinding.cs
- MdImport.cs
- WebPartConnectVerb.cs
- CompilationRelaxations.cs
- Substitution.cs
- SqlRetyper.cs
- SqlRecordBuffer.cs
- WindowsToolbarItemAsMenuItem.cs
- ExpandCollapseProviderWrapper.cs
- SetStoryboardSpeedRatio.cs
- NavigationProgressEventArgs.cs
- TextTreeObjectNode.cs
- WorkflowShape.cs
- RangeValueProviderWrapper.cs
- UnsignedPublishLicense.cs
- AnimationException.cs
- QilValidationVisitor.cs
- WriteFileContext.cs