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
- DataGridRowsPresenter.cs
- PartialClassGenerationTaskInternal.cs
- ColorKeyFrameCollection.cs
- FileSystemEventArgs.cs
- SoapIncludeAttribute.cs
- SqlProcedureAttribute.cs
- ApplicationProxyInternal.cs
- UnconditionalPolicy.cs
- SqlFactory.cs
- TimelineGroup.cs
- GetPageNumberCompletedEventArgs.cs
- ReadOnlyCollectionBase.cs
- CompletionCallbackWrapper.cs
- Compress.cs
- CompModSwitches.cs
- PropertyIDSet.cs
- httpstaticobjectscollection.cs
- GridViewDeleteEventArgs.cs
- FocusManager.cs
- SelectionEditingBehavior.cs
- Metafile.cs
- EmptyCollection.cs
- FileCodeGroup.cs
- StreamWithDictionary.cs
- WebHttpBindingElement.cs
- OracleParameter.cs
- ObjectView.cs
- HashLookup.cs
- PerformanceCounter.cs
- DataGridViewColumnHeaderCell.cs
- GradientBrush.cs
- XPathEmptyIterator.cs
- PauseStoryboard.cs
- Qualifier.cs
- FrameworkTemplate.cs
- WmlTextBoxAdapter.cs
- Tuple.cs
- NetPipeSection.cs
- FormViewRow.cs
- EntityClassGenerator.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- Int16Converter.cs
- PropertyCondition.cs
- ExpressionNode.cs
- IndentTextWriter.cs
- Column.cs
- NativeMethods.cs
- GenericUriParser.cs
- ReceiveActivityValidator.cs
- AgileSafeNativeMemoryHandle.cs
- MethodBuilderInstantiation.cs
- ScrollContentPresenter.cs
- PageRequestManager.cs
- HttpResponseHeader.cs
- XD.cs
- XmlConvert.cs
- FontResourceCache.cs
- ConsoleTraceListener.cs
- NotImplementedException.cs
- brushes.cs
- WeakReferenceEnumerator.cs
- RangeValuePattern.cs
- SelectionHighlightInfo.cs
- NativeMethods.cs
- TableRowCollection.cs
- AccessText.cs
- NonVisualControlAttribute.cs
- InvokeMemberBinder.cs
- HTTP_SERVICE_CONFIG_URLACL_KEY.cs
- DataGridParentRows.cs
- CompressedStack.cs
- DetailsViewRowCollection.cs
- XmlQueryType.cs
- MenuItemAutomationPeer.cs
- HttpApplicationStateBase.cs
- HierarchicalDataBoundControl.cs
- DBDataPermission.cs
- _BaseOverlappedAsyncResult.cs
- RegionData.cs
- WebPartPersonalization.cs
- WSDualHttpSecurity.cs
- Selector.cs
- RelationshipEndCollection.cs
- TextHidden.cs
- Activation.cs
- PartialList.cs
- PackageProperties.cs
- FormsAuthenticationUserCollection.cs
- DataRecordInfo.cs
- EventProviderWriter.cs
- SchemaTypeEmitter.cs
- FixedSOMTable.cs
- FilteredDataSetHelper.cs
- TextSimpleMarkerProperties.cs
- TextUtf8RawTextWriter.cs
- ConstraintStruct.cs
- CodeMethodMap.cs
- PeerApplication.cs
- XMLDiffLoader.cs
- X509ClientCertificateAuthentication.cs