Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- UIntPtr.cs
- BufferedGraphicsContext.cs
- DocumentApplicationJournalEntry.cs
- StringValueConverter.cs
- NumericExpr.cs
- DesigntimeLicenseContextSerializer.cs
- ObjectHelper.cs
- Currency.cs
- PanelStyle.cs
- AuthenticationConfig.cs
- TdsValueSetter.cs
- NetCodeGroup.cs
- OutputScopeManager.cs
- Emitter.cs
- BrowserCapabilitiesFactoryBase.cs
- HttpVersion.cs
- KeyEventArgs.cs
- SoapCodeExporter.cs
- AuthorizationPolicyTypeElementCollection.cs
- CheckBoxPopupAdapter.cs
- DateRangeEvent.cs
- CustomCredentialPolicy.cs
- AssemblyHash.cs
- Cursor.cs
- SpecialNameAttribute.cs
- _ShellExpression.cs
- JsonStringDataContract.cs
- thaishape.cs
- NetworkInterface.cs
- Listbox.cs
- Nodes.cs
- DiscardableAttribute.cs
- TdsParser.cs
- OracleConnectionFactory.cs
- RotationValidation.cs
- Enumerable.cs
- Line.cs
- BridgeDataRecord.cs
- Touch.cs
- CatalogZoneAutoFormat.cs
- SHA512.cs
- CounterCreationData.cs
- OrderingExpression.cs
- DefaultPrintController.cs
- UnaryNode.cs
- FaultContext.cs
- ContainerControl.cs
- ProtectedProviderSettings.cs
- QuaternionRotation3D.cs
- PingReply.cs
- GeometryValueSerializer.cs
- ParseHttpDate.cs
- InternalException.cs
- XmlElementAttributes.cs
- SqlConnectionStringBuilder.cs
- InputLanguageProfileNotifySink.cs
- ResourceContainerWrapper.cs
- wgx_render.cs
- Binding.cs
- ProxyGenerationError.cs
- ServiceKnownTypeAttribute.cs
- XmlCountingReader.cs
- RedirectionProxy.cs
- CounterSample.cs
- BitmapEffectDrawing.cs
- ChtmlTextWriter.cs
- WinFormsSecurity.cs
- DescendantOverDescendantQuery.cs
- MessageEncodingBindingElement.cs
- TaskScheduler.cs
- DesignBindingPropertyDescriptor.cs
- DashStyle.cs
- SelectionRange.cs
- RTLAwareMessageBox.cs
- EntitySqlQueryCacheEntry.cs
- PopupRoot.cs
- x509utils.cs
- BasicExpressionVisitor.cs
- BStrWrapper.cs
- XPathNodeList.cs
- BaseCAMarshaler.cs
- ElapsedEventArgs.cs
- MobileControlsSectionHelper.cs
- SrgsElementFactory.cs
- XmlHierarchicalDataSourceView.cs
- NativeCppClassAttribute.cs
- ProfessionalColors.cs
- SQLMembershipProvider.cs
- WhitespaceRuleReader.cs
- GroupBoxRenderer.cs
- FacetChecker.cs
- XmlTextReaderImpl.cs
- SynchronousReceiveBehavior.cs
- TransactionCache.cs
- Delegate.cs
- ButtonColumn.cs
- CombinedGeometry.cs
- RuntimeEnvironment.cs
- SspiHelper.cs
- HijriCalendar.cs