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
- NativeCppClassAttribute.cs
- XamlDesignerSerializationManager.cs
- ParentQuery.cs
- JoinElimination.cs
- LayoutEditorPart.cs
- NameValueSectionHandler.cs
- EpmSourceTree.cs
- HandlerFactoryCache.cs
- Baml6Assembly.cs
- COM2TypeInfoProcessor.cs
- MetadataPropertyAttribute.cs
- PlainXmlDeserializer.cs
- SqlRecordBuffer.cs
- InvalidEnumArgumentException.cs
- HTMLTextWriter.cs
- AttributeCollection.cs
- CompiledELinqQueryState.cs
- TrackingQueryElement.cs
- OpacityConverter.cs
- MulticastOption.cs
- Opcode.cs
- Predicate.cs
- Style.cs
- GetReadStreamResult.cs
- BoolExpressionVisitors.cs
- LocalBuilder.cs
- VectorValueSerializer.cs
- SrgsDocumentParser.cs
- EntityTypeBase.cs
- UriTemplateTrieNode.cs
- PageAsyncTaskManager.cs
- Int32Rect.cs
- UserControlDocumentDesigner.cs
- WSTrustDec2005.cs
- QilParameter.cs
- DbConnectionStringBuilder.cs
- ColumnReorderedEventArgs.cs
- TCEAdapterGenerator.cs
- BitmapMetadataBlob.cs
- AuthenticationModuleElementCollection.cs
- BinaryObjectWriter.cs
- IPEndPoint.cs
- TextShapeableCharacters.cs
- TemplateKey.cs
- GCHandleCookieTable.cs
- XamlRtfConverter.cs
- FolderNameEditor.cs
- ListDictionary.cs
- RegexGroupCollection.cs
- ObjectViewEntityCollectionData.cs
- GroupBoxAutomationPeer.cs
- TargetException.cs
- InputReferenceExpression.cs
- DeclarativeCatalogPart.cs
- MarkupCompilePass2.cs
- ShaderRenderModeValidation.cs
- ResourceAttributes.cs
- EnumerationRangeValidationUtil.cs
- EventSource.cs
- DivideByZeroException.cs
- ToolStripContentPanelRenderEventArgs.cs
- GeometryCollection.cs
- DataGridViewButtonCell.cs
- Run.cs
- XNodeValidator.cs
- TouchPoint.cs
- EntityFunctions.cs
- CDSCollectionETWBCLProvider.cs
- Int32CAMarshaler.cs
- ChannelSinkStacks.cs
- SslSecurityTokenParameters.cs
- SubMenuStyle.cs
- XmlValidatingReader.cs
- ServiceParser.cs
- ContentElementAutomationPeer.cs
- ToolStripGrip.cs
- XhtmlBasicControlAdapter.cs
- XmlParser.cs
- DataSpaceManager.cs
- ProfileGroupSettingsCollection.cs
- SQLUtility.cs
- EntityContainerRelationshipSet.cs
- UriWriter.cs
- ToolZone.cs
- IPEndPointCollection.cs
- ToolStripProgressBar.cs
- Debug.cs
- PseudoWebRequest.cs
- CachingHintValidation.cs
- BitConverter.cs
- SkinBuilder.cs
- HttpPostedFileBase.cs
- Property.cs
- SmtpReplyReader.cs
- DataListGeneralPage.cs
- ToolboxComponentsCreatingEventArgs.cs
- EntityDataSourceView.cs
- HierarchicalDataBoundControl.cs
- CheckBoxBaseAdapter.cs
- InvalidPrinterException.cs