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
- XmlnsDefinitionAttribute.cs
- _BaseOverlappedAsyncResult.cs
- FrameworkElementFactory.cs
- ReverseComparer.cs
- LocalizableAttribute.cs
- RPIdentityRequirement.cs
- PathSegment.cs
- SHA256.cs
- HttpBindingExtension.cs
- PanelDesigner.cs
- WorkflowClientDeliverMessageWrapper.cs
- CachedFontFamily.cs
- KeyValuePair.cs
- XmlElementElementCollection.cs
- WsatConfiguration.cs
- CryptoApi.cs
- entitydatasourceentitysetnameconverter.cs
- Memoizer.cs
- CompilationSection.cs
- QuaternionRotation3D.cs
- DesignerSerializationVisibilityAttribute.cs
- DeviceSpecific.cs
- HelpOperationInvoker.cs
- Document.cs
- ToolStripInSituService.cs
- AlphabeticalEnumConverter.cs
- TextPattern.cs
- RegexWorker.cs
- TypeConverterHelper.cs
- BinaryObjectReader.cs
- InputElement.cs
- MailMessageEventArgs.cs
- AppDomainEvidenceFactory.cs
- KeyValuePair.cs
- MetadataPropertyAttribute.cs
- OneOfScalarConst.cs
- BlockUIContainer.cs
- updatecommandorderer.cs
- ResXBuildProvider.cs
- SqlNode.cs
- OperationInvokerBehavior.cs
- SiteMapNode.cs
- DataSvcMapFileSerializer.cs
- DurationConverter.cs
- ReferenceTypeElement.cs
- DefaultBinder.cs
- NativeMethods.cs
- TextHidden.cs
- ISessionStateStore.cs
- TypeUtil.cs
- PartialTrustHelpers.cs
- CustomErrorCollection.cs
- ReferenceAssemblyAttribute.cs
- PolyBezierSegmentFigureLogic.cs
- RegionData.cs
- BitmapEffectGroup.cs
- Message.cs
- GlobalProxySelection.cs
- BitmapEffectDrawingContextWalker.cs
- XmlChildNodes.cs
- HtmlMeta.cs
- CollectionViewGroup.cs
- TextTreeRootNode.cs
- MatrixUtil.cs
- DataBoundControlHelper.cs
- PersonalizationStateQuery.cs
- DesignerOptionService.cs
- ColumnResizeUndoUnit.cs
- OutputCacheSettings.cs
- ErrorFormatterPage.cs
- SerializerProvider.cs
- FixedTextBuilder.cs
- Component.cs
- UpdateException.cs
- WebPartActionVerb.cs
- DoubleLinkListEnumerator.cs
- CorrelationManager.cs
- FixedSOMImage.cs
- Exceptions.cs
- XmlSchemaGroupRef.cs
- CodeDelegateInvokeExpression.cs
- TemplateBindingExtensionConverter.cs
- RegularExpressionValidator.cs
- ContentPresenter.cs
- ResolvedKeyFrameEntry.cs
- PathFigure.cs
- Random.cs
- ProviderBase.cs
- CompoundFileIOPermission.cs
- Token.cs
- DiscoveryExceptionDictionary.cs
- securitycriticaldataClass.cs
- TemplateControl.cs
- TypeUtils.cs
- XmlNodeChangedEventArgs.cs
- ProcessRequestArgs.cs
- Authorization.cs
- HttpWebRequest.cs
- ImageBrush.cs
- DataSourceCacheDurationConverter.cs