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
- SearchForVirtualItemEventArgs.cs
- UTF7Encoding.cs
- WhiteSpaceTrimStringConverter.cs
- Localizer.cs
- UnsafeNativeMethodsPenimc.cs
- TableItemProviderWrapper.cs
- ReceiveMessageAndVerifySecurityAsyncResultBase.cs
- HtmlSelectionListAdapter.cs
- ViewEvent.cs
- BooleanSwitch.cs
- DbConnectionPoolGroup.cs
- IOException.cs
- SectionInformation.cs
- CompilerResults.cs
- CharKeyFrameCollection.cs
- ReachVisualSerializerAsync.cs
- RawAppCommandInputReport.cs
- SmiMetaData.cs
- QilChoice.cs
- AesManaged.cs
- ParserExtension.cs
- GlobalEventManager.cs
- PrimitiveSchema.cs
- FileDataSourceCache.cs
- StorageFunctionMapping.cs
- AtomicFile.cs
- AmbiguousMatchException.cs
- xmlformatgeneratorstatics.cs
- DocumentManager.cs
- AdornedElementPlaceholder.cs
- DoubleLinkListEnumerator.cs
- IgnoreFlushAndCloseStream.cs
- DaylightTime.cs
- _ListenerRequestStream.cs
- XMLSchema.cs
- TemplateParser.cs
- securitymgrsite.cs
- InstanceKeyNotReadyException.cs
- JsonQueryStringConverter.cs
- OptimizedTemplateContentHelper.cs
- QilStrConcatenator.cs
- MailWriter.cs
- SaveRecipientRequest.cs
- Model3DCollection.cs
- MdiWindowListStrip.cs
- WebPartRestoreVerb.cs
- XmlWriterTraceListener.cs
- TimeStampChecker.cs
- CurrentTimeZone.cs
- WindowsRichEditRange.cs
- SQLGuidStorage.cs
- KeyProperty.cs
- DivideByZeroException.cs
- SoapTypeAttribute.cs
- SiblingIterators.cs
- MenuItemBinding.cs
- IntranetCredentialPolicy.cs
- QilReplaceVisitor.cs
- Helpers.cs
- RegexCompiler.cs
- ImageDesigner.cs
- ComContractElementCollection.cs
- TypeDescriptorContext.cs
- XpsColorContext.cs
- RankException.cs
- FastEncoder.cs
- WaveHeader.cs
- ContractsBCL.cs
- Keyboard.cs
- SelectionRangeConverter.cs
- AbsoluteQuery.cs
- PropertyValueUIItem.cs
- LocationSectionRecord.cs
- hwndwrapper.cs
- CommandDevice.cs
- HebrewCalendar.cs
- CompoundFileDeflateTransform.cs
- XmlQueryTypeFactory.cs
- ObjectSpanRewriter.cs
- DivideByZeroException.cs
- MenuEventArgs.cs
- AssemblyResourceLoader.cs
- DataAdapter.cs
- ValueCollectionParameterReader.cs
- SqlWorkflowInstanceStoreLock.cs
- _HeaderInfoTable.cs
- ResourcePermissionBaseEntry.cs
- InputLangChangeRequestEvent.cs
- XmlSortKeyAccumulator.cs
- BaseTemplateBuildProvider.cs
- ScriptingScriptResourceHandlerSection.cs
- SafeCertificateStore.cs
- CodeRemoveEventStatement.cs
- CodeDomConfigurationHandler.cs
- UnitySerializationHolder.cs
- UriScheme.cs
- ToolStripGrip.cs
- ProviderCommandInfoUtils.cs
- CommentEmitter.cs
- SqlVersion.cs