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
- InternalEnumValidator.cs
- MiniParameterInfo.cs
- SqlWriter.cs
- DeobfuscatingStream.cs
- TcpConnectionPool.cs
- AudioDeviceOut.cs
- ProofTokenCryptoHandle.cs
- SettingsProviderCollection.cs
- OdbcCommand.cs
- SelectionWordBreaker.cs
- BufferedStream.cs
- InternalControlCollection.cs
- DesignSurface.cs
- HttpMethodAttribute.cs
- InstanceNameConverter.cs
- Point3DAnimationBase.cs
- TemplateFactory.cs
- Int32EqualityComparer.cs
- PropertyKey.cs
- HopperCache.cs
- SqlConnection.cs
- TypeConverter.cs
- FontSourceCollection.cs
- _NestedMultipleAsyncResult.cs
- UserControl.cs
- EndpointAddressProcessor.cs
- DoubleLink.cs
- WebRequestModuleElement.cs
- QilTargetType.cs
- DataGridCaption.cs
- CalendarItem.cs
- MetadataItemSerializer.cs
- DoubleKeyFrameCollection.cs
- Vector3D.cs
- TemplatedMailWebEventProvider.cs
- AutoResetEvent.cs
- ConfigurationLocationCollection.cs
- ArraySubsetEnumerator.cs
- BindingManagerDataErrorEventArgs.cs
- EntryIndex.cs
- PenCursorManager.cs
- HostVisual.cs
- PropertyPathWorker.cs
- HttpModule.cs
- ExtendedPropertyInfo.cs
- FixedHyperLink.cs
- ResourceKey.cs
- ProfileProvider.cs
- MenuEventArgs.cs
- FontDifferentiator.cs
- SchemaImporterExtensionsSection.cs
- WindowsScrollBarBits.cs
- PrtTicket_Public.cs
- SendingRequestEventArgs.cs
- BitmapEffectInputData.cs
- TemplateBuilder.cs
- ReadContentAsBinaryHelper.cs
- XmlExpressionDumper.cs
- BaseProcessor.cs
- ToolboxDataAttribute.cs
- WebOperationContext.cs
- HiddenFieldDesigner.cs
- BrowserCapabilitiesFactory.cs
- WinFormsSpinner.cs
- PointLight.cs
- WebSysDisplayNameAttribute.cs
- CodePageUtils.cs
- SoapHeaderException.cs
- ToolstripProfessionalRenderer.cs
- Gdiplus.cs
- ConfigurationValidatorAttribute.cs
- BufferModesCollection.cs
- XmlNodeList.cs
- TypeLibConverter.cs
- PageRanges.cs
- AuthorizationRuleCollection.cs
- DocumentEventArgs.cs
- WebControl.cs
- ChineseLunisolarCalendar.cs
- FileEnumerator.cs
- Msec.cs
- ContainsRowNumberChecker.cs
- ProcessManager.cs
- ArglessEventHandlerProxy.cs
- HasCopySemanticsAttribute.cs
- XmlSchemaAttributeGroupRef.cs
- ResourceDescriptionAttribute.cs
- DateTimeStorage.cs
- formatter.cs
- SoapRpcMethodAttribute.cs
- ErrorEventArgs.cs
- ProfileInfo.cs
- AuthenticatedStream.cs
- ToolTip.cs
- Crc32.cs
- CheckoutException.cs
- CapabilitiesAssignment.cs
- DataGridViewColumnConverter.cs
- ImpersonationContext.cs
- Point3D.cs