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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DefaultTraceListener.cs
- RemoteWebConfigurationHostServer.cs
- LineInfo.cs
- InstanceKeyView.cs
- UIElementParaClient.cs
- DesignerProperties.cs
- ResXResourceReader.cs
- PathNode.cs
- ConstraintStruct.cs
- CopyOnWriteList.cs
- LambdaCompiler.Statements.cs
- XmlDocumentFragment.cs
- ByteAnimationUsingKeyFrames.cs
- FixedPage.cs
- CharacterHit.cs
- XmlEntityReference.cs
- PerfProviderCollection.cs
- Empty.cs
- ValueCollectionParameterReader.cs
- AssemblyResourceLoader.cs
- DefaultProxySection.cs
- ManagedIStream.cs
- ApplicationCommands.cs
- Rect3D.cs
- Style.cs
- Odbc32.cs
- WindowsSpinner.cs
- BulletDecorator.cs
- WebPartConnectionsCloseVerb.cs
- TagMapInfo.cs
- PhoneCall.cs
- NumberFunctions.cs
- DynamicValueConverter.cs
- ListBase.cs
- CommonGetThemePartSize.cs
- CompoundFileStreamReference.cs
- HtmlWindowCollection.cs
- ObjectNavigationPropertyMapping.cs
- Control.cs
- DummyDataSource.cs
- GridViewItemAutomationPeer.cs
- ConfigurationErrorsException.cs
- HMACSHA512.cs
- SparseMemoryStream.cs
- WorkflowDefinitionDispenser.cs
- DockProviderWrapper.cs
- ItemCheckedEvent.cs
- EdmProperty.cs
- XamlFilter.cs
- FrameworkElementFactory.cs
- UnsafeNativeMethodsTablet.cs
- PropertyNames.cs
- TypeLibConverter.cs
- XpsFilter.cs
- CodeStatementCollection.cs
- XmlSchemaExporter.cs
- CheckBoxAutomationPeer.cs
- DelegatingConfigHost.cs
- CodeExpressionStatement.cs
- TakeQueryOptionExpression.cs
- PropertyTabChangedEvent.cs
- XmlWriterTraceListener.cs
- HttpProxyCredentialType.cs
- ToolboxBitmapAttribute.cs
- CustomAttribute.cs
- RectAnimationClockResource.cs
- ZoneIdentityPermission.cs
- TextSelectionHighlightLayer.cs
- ContextQuery.cs
- ProxyManager.cs
- TypeHelper.cs
- BasePattern.cs
- ISCIIEncoding.cs
- DataObject.cs
- UIHelper.cs
- Atom10FormatterFactory.cs
- XmlTextReaderImpl.cs
- LowerCaseStringConverter.cs
- Splitter.cs
- precedingsibling.cs
- _HTTPDateParse.cs
- DesignerValidationSummaryAdapter.cs
- PersonalizationProviderHelper.cs
- MergeExecutor.cs
- NativeMethods.cs
- MemberHolder.cs
- SignatureHelper.cs
- dtdvalidator.cs
- ServiceModelStringsVersion1.cs
- XmlEncodedRawTextWriter.cs
- UICuesEvent.cs
- StylusShape.cs
- GeneralTransform2DTo3D.cs
- odbcmetadatafactory.cs
- StoryFragments.cs
- WCFBuildProvider.cs
- ActivityCodeDomSerializationManager.cs
- ToolBarOverflowPanel.cs
- DesignerLoader.cs
- MemoryRecordBuffer.cs