Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- Identity.cs
- Journaling.cs
- StreamProxy.cs
- DeclarativeCatalogPart.cs
- CompModHelpers.cs
- CompositeClientFormatter.cs
- UnsafeNativeMethodsPenimc.cs
- ValueProviderWrapper.cs
- CodeEntryPointMethod.cs
- InvalidOleVariantTypeException.cs
- FilteredXmlReader.cs
- FunctionUpdateCommand.cs
- NonParentingControl.cs
- Pkcs7Recipient.cs
- GridPatternIdentifiers.cs
- MatrixTransform3D.cs
- ReflectPropertyDescriptor.cs
- String.cs
- EntityDataSourceValidationException.cs
- ProjectionCamera.cs
- Subtree.cs
- XmlTypeMapping.cs
- ZipFileInfo.cs
- WebBaseEventKeyComparer.cs
- ConsoleKeyInfo.cs
- WindowsListViewItemStartMenu.cs
- RuleRef.cs
- BreadCrumbTextConverter.cs
- FieldDescriptor.cs
- WebServiceTypeData.cs
- PageContentAsyncResult.cs
- DomainLiteralReader.cs
- SubMenuStyleCollectionEditor.cs
- FunctionMappingTranslator.cs
- XmlHierarchyData.cs
- CounterCreationDataConverter.cs
- OleDbErrorCollection.cs
- FontInfo.cs
- TemplateBamlTreeBuilder.cs
- InstanceLockTracking.cs
- XmlSchemaObject.cs
- AudioLevelUpdatedEventArgs.cs
- HorizontalAlignConverter.cs
- Panel.cs
- XXXOnTypeBuilderInstantiation.cs
- CryptoConfig.cs
- Nodes.cs
- XhtmlBasicSelectionListAdapter.cs
- StreamAsIStream.cs
- HostSecurityManager.cs
- ObjectSecurity.cs
- Point3DConverter.cs
- QueryableDataSource.cs
- FilteredDataSetHelper.cs
- DataGridTable.cs
- RuleSettings.cs
- SystemSounds.cs
- TimeIntervalCollection.cs
- ImportOptions.cs
- TextFormatterContext.cs
- DateTimeConverter.cs
- SynchronizingStream.cs
- AutomationPatternInfo.cs
- DictationGrammar.cs
- InputEventArgs.cs
- SQLSingleStorage.cs
- IItemContainerGenerator.cs
- VBCodeProvider.cs
- ReceiveCompletedEventArgs.cs
- XmlValidatingReader.cs
- StorageFunctionMapping.cs
- IsolatedStorageException.cs
- _SSPISessionCache.cs
- Cursor.cs
- HtmlTableRowCollection.cs
- EdmPropertyAttribute.cs
- IIS7WorkerRequest.cs
- DataGridViewRowPostPaintEventArgs.cs
- DaylightTime.cs
- ContentPlaceHolder.cs
- FormViewInsertedEventArgs.cs
- DPCustomTypeDescriptor.cs
- ProfessionalColorTable.cs
- MsmqActivation.cs
- ControlIdConverter.cs
- BufferedOutputAsyncStream.cs
- Clipboard.cs
- WebProxyScriptElement.cs
- Region.cs
- XmlBaseWriter.cs
- XmlUtilWriter.cs
- SoapReflectionImporter.cs
- FormsAuthenticationCredentials.cs
- TransactionChannelFaultConverter.cs
- MetadataArtifactLoader.cs
- XomlCompilerError.cs
- CollectionChangedEventManager.cs
- HashCodeCombiner.cs
- LocalizableAttribute.cs
- HtmlDocument.cs