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
- Stackframe.cs
- SizeLimitedCache.cs
- XmlCompatibilityReader.cs
- DateTimeConverter.cs
- MimeMultiPart.cs
- DateTimeConverter.cs
- ContentType.cs
- Span.cs
- EntityDataSourceContainerNameConverter.cs
- DataGridViewComboBoxColumn.cs
- QuadraticBezierSegment.cs
- DependencyPropertyHelper.cs
- HwndAppCommandInputProvider.cs
- AppLevelCompilationSectionCache.cs
- DefaultProxySection.cs
- objectresult_tresulttype.cs
- AppearanceEditorPart.cs
- LayoutDump.cs
- ReachFixedDocumentSerializerAsync.cs
- ObjectParameter.cs
- ExceptionHelpers.cs
- CalendarDay.cs
- MenuItem.cs
- ValidationManager.cs
- TextViewBase.cs
- XmlSerializerNamespaces.cs
- QilTernary.cs
- CryptoStream.cs
- StorageFunctionMapping.cs
- ListViewInsertionMark.cs
- SrgsRule.cs
- HttpRequest.cs
- SharedPerformanceCounter.cs
- Dictionary.cs
- SecurityHeader.cs
- ConfigurationPropertyCollection.cs
- DataGridItemEventArgs.cs
- SweepDirectionValidation.cs
- OleDbReferenceCollection.cs
- NamespaceImport.cs
- WorkflowPageSetupDialog.cs
- BitmapCache.cs
- MobileControlsSection.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- DecoderReplacementFallback.cs
- ObjectComplexPropertyMapping.cs
- TabPage.cs
- TextEditorDragDrop.cs
- LineSegment.cs
- DecoderFallbackWithFailureFlag.cs
- XsdDataContractExporter.cs
- ToolBarButton.cs
- BitmapEffectCollection.cs
- securitycriticaldataformultiplegetandset.cs
- AsyncPostBackTrigger.cs
- SafeCryptoHandles.cs
- AbsoluteQuery.cs
- ChannelBinding.cs
- BuildProviderCollection.cs
- Console.cs
- FileEnumerator.cs
- KeyedQueue.cs
- Boolean.cs
- PriorityChain.cs
- Facet.cs
- BrowserCapabilitiesFactory35.cs
- ConstraintConverter.cs
- FormatPage.cs
- SessionStateItemCollection.cs
- Fonts.cs
- UITypeEditor.cs
- AuthorizationSection.cs
- OdbcErrorCollection.cs
- ColumnBinding.cs
- MatchingStyle.cs
- SiteOfOriginContainer.cs
- LicenseException.cs
- DocumentsTrace.cs
- Scene3D.cs
- ModelItemCollection.cs
- MarshalByRefObject.cs
- OperationCanceledException.cs
- Int32CollectionValueSerializer.cs
- ConfigXmlAttribute.cs
- CommandLibraryHelper.cs
- FontStyles.cs
- AxHost.cs
- XamlValidatingReader.cs
- DataContractSerializerSection.cs
- ByteStorage.cs
- FileAuthorizationModule.cs
- TextWriterEngine.cs
- DependencyObjectProvider.cs
- EnumValidator.cs
- RoleGroup.cs
- PageAsyncTaskManager.cs
- AsnEncodedData.cs
- ToolStripDropDownButton.cs
- SupportingTokenParameters.cs
- _NegoState.cs