Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / Microsoft / SqlServer / Server / SqlTriggerContext.cs / 1305376 / 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; public 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; public 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
- MatrixTransform3D.cs
- XmlDocumentFragment.cs
- CommonDialog.cs
- RuleCache.cs
- UInt64Storage.cs
- XmlSchemaProviderAttribute.cs
- AssemblyAttributes.cs
- ScriptingScriptResourceHandlerSection.cs
- ComponentResourceKeyConverter.cs
- CheckoutException.cs
- EditorZone.cs
- selecteditemcollection.cs
- CodeDOMUtility.cs
- WhitespaceSignificantCollectionAttribute.cs
- InternalResources.cs
- StructuredTypeInfo.cs
- HttpApplication.cs
- AttributeUsageAttribute.cs
- HtmlInputRadioButton.cs
- PenThreadWorker.cs
- TypeDescriptionProviderAttribute.cs
- DocumentPaginator.cs
- SqlGatherProducedAliases.cs
- CounterSample.cs
- HotSpotCollection.cs
- PackageRelationshipCollection.cs
- RoleManagerEventArgs.cs
- Deflater.cs
- ListViewItemEventArgs.cs
- DateTimeParse.cs
- TriggerBase.cs
- BindingUtils.cs
- SocketPermission.cs
- NamespaceInfo.cs
- TitleStyle.cs
- Error.cs
- SamlAttributeStatement.cs
- TypeName.cs
- ProtocolsConfigurationEntry.cs
- RoleGroupCollection.cs
- KeyProperty.cs
- HWStack.cs
- DataGridViewComboBoxCell.cs
- TextInfo.cs
- MenuAdapter.cs
- XmlChoiceIdentifierAttribute.cs
- ToolStripItemClickedEventArgs.cs
- Window.cs
- EncoderFallback.cs
- WeakReferenceList.cs
- OleCmdHelper.cs
- CorrelationValidator.cs
- AnnotationHighlightLayer.cs
- HyperLinkColumn.cs
- VarRefManager.cs
- XpsFont.cs
- DataGridPageChangedEventArgs.cs
- NetworkInformationPermission.cs
- HttpContext.cs
- AuthorizationRule.cs
- PathSegment.cs
- GZipStream.cs
- DataGridViewButtonColumn.cs
- SizeFConverter.cs
- RemoteWebConfigurationHost.cs
- ParameterBuilder.cs
- StringSorter.cs
- ExtendedProtectionPolicyElement.cs
- DrawingAttributeSerializer.cs
- TextRangeProviderWrapper.cs
- DataGridViewColumnHeaderCell.cs
- DropShadowEffect.cs
- MultiByteCodec.cs
- LinkButton.cs
- ConfigurationSettings.cs
- FillBehavior.cs
- SystemResources.cs
- SqlInternalConnectionTds.cs
- BamlWriter.cs
- WebScriptClientGenerator.cs
- AnnotationMap.cs
- DataControlFieldHeaderCell.cs
- FormattedTextSymbols.cs
- DetailsView.cs
- ThreadAbortException.cs
- MetadataArtifactLoaderComposite.cs
- ExpressionPrefixAttribute.cs
- TextEffectResolver.cs
- ManifestSignatureInformation.cs
- prompt.cs
- SqlFactory.cs
- StaticFileHandler.cs
- EmptyCollection.cs
- Brushes.cs
- DataPagerFieldCollection.cs
- SynchronousChannelMergeEnumerator.cs
- QuarticEase.cs
- SettingsPropertyIsReadOnlyException.cs
- LinearGradientBrush.cs
- EdgeProfileValidation.cs