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
- ForeignKeyConstraint.cs
- DataSourceListEditor.cs
- ContextMenuStripActionList.cs
- Point3DValueSerializer.cs
- PrivilegeNotHeldException.cs
- OleDbRowUpdatedEvent.cs
- SmtpDigestAuthenticationModule.cs
- HttpResponseInternalWrapper.cs
- BitmapEffectInput.cs
- LexicalChunk.cs
- ListBoxItemWrapperAutomationPeer.cs
- StubHelpers.cs
- ProfileProvider.cs
- BindingSource.cs
- ClosableStream.cs
- LinqDataSourceEditData.cs
- ISAPIRuntime.cs
- DeclaredTypeElement.cs
- _PooledStream.cs
- DBNull.cs
- PartialClassGenerationTask.cs
- DocumentOutline.cs
- MatrixKeyFrameCollection.cs
- ConfigXmlElement.cs
- CollectionConverter.cs
- DllNotFoundException.cs
- InvalidCommandTreeException.cs
- SimpleHandlerFactory.cs
- Classification.cs
- Storyboard.cs
- PathTooLongException.cs
- _UncName.cs
- AdapterUtil.cs
- FileLevelControlBuilderAttribute.cs
- DataFormat.cs
- ObjectQueryState.cs
- BufferModeSettings.cs
- WizardPanel.cs
- HTMLTextWriter.cs
- HScrollBar.cs
- DataGridViewRow.cs
- TcpDuplicateContext.cs
- PartitionedStream.cs
- HttpRequestMessageProperty.cs
- MergablePropertyAttribute.cs
- TextCharacters.cs
- FieldToken.cs
- WebPartUserCapability.cs
- HtmlHistory.cs
- ToolStripItem.cs
- MetadataCollection.cs
- DynamicDataManager.cs
- TextTreePropertyUndoUnit.cs
- ObfuscateAssemblyAttribute.cs
- GraphicsPathIterator.cs
- FakeModelItemImpl.cs
- NavigationPropertySingletonExpression.cs
- HashCodeCombiner.cs
- ParallelQuery.cs
- PopupRoot.cs
- ClientTargetCollection.cs
- GreenMethods.cs
- VisualStyleRenderer.cs
- CompatibleIComparer.cs
- ManagedWndProcTracker.cs
- AuthenticationConfig.cs
- Compensate.cs
- WebPartConnectionsCancelVerb.cs
- OdbcErrorCollection.cs
- TextTreeText.cs
- MSAAWinEventWrap.cs
- EventLogHandle.cs
- XmlResolver.cs
- FlowDocumentScrollViewer.cs
- WindowsFormsSynchronizationContext.cs
- InfoCardHelper.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- RegisteredScript.cs
- SqlDataSourceCommandEventArgs.cs
- Properties.cs
- BamlTreeMap.cs
- BitmapEffectGroup.cs
- WebAdminConfigurationHelper.cs
- TextSearch.cs
- MethodCallTranslator.cs
- FrameworkElementAutomationPeer.cs
- XmlNodeWriter.cs
- ExternalFile.cs
- RoleManagerModule.cs
- HtmlEmptyTagControlBuilder.cs
- CompiledScopeCriteria.cs
- UriTemplateEquivalenceComparer.cs
- VersionPair.cs
- EncoderParameter.cs
- CompoundFileStreamReference.cs
- AlgoModule.cs
- ErrorReporting.cs
- RoleGroupCollection.cs
- dbdatarecord.cs
- SettingsProperty.cs