Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Data / Microsoft / SqlServer / Server / SmiEventSink_DeferedProcessing.cs / 2 / SmiEventSink_DeferedProcessing.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace Microsoft.SqlServer.Server { using System.Data.Sql; using System.Data.SqlClient; using System.Diagnostics; // This class exists purely to defer processing of messages until a later time. // It is designed to allow calling common code that interacts with the SMI layers // without throwing or otherwise processing messages in the sink until later on. // // Main example: // SqlCommand.ExecuteNonQuerySmi calls EventStream.ProcessEvent with it's command event sink (CES) // ProcessEvent calls OnParametersAvailable on the CES // OnParametersAvailable sets up a deferedprocessing event sink (DPES) with the CES as its parent // OnParametersAvailable calls ValueUtils to extract param values passing the DPES // ValueUtils calls Smi passing DPES // Smi may call MessagePosted, which will send a message up the sink parent chain and save it. // ValueUtils calls ProcessMessagesAndThrow on DPES, which skips handling // ... return up the stack ... // SqlCommand.ExecuteNonQuerySmi calls CES.ProcessMessagesAndThrow, which handles the messages // sent from the Smi value extraction code. // // IMPORTANT: Code that uses the DeferedProccess event sink is responsible for ensuring that // these messages ARE processed at some point. internal class SmiEventSink_DeferedProcessing : SmiEventSink_Default { internal SmiEventSink_DeferedProcessing ( SmiEventSink parent ) : base(parent) { } protected override void DispatchMessages(bool ignoreNonFatalMessages) { // Skip processing messages. Since messages are sent to parent and calling code will call // ProcessMessages against parent, messages ARE NOT LOST! } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSchemaIdentityConstraint.cs
- TypeUtil.cs
- DataSource.cs
- CalendarDataBindingHandler.cs
- MetadataPropertyCollection.cs
- ReflectionTypeLoadException.cs
- AliasExpr.cs
- KnownAssemblyEntry.cs
- Comparer.cs
- VirtualDirectoryMapping.cs
- XPathDocumentNavigator.cs
- DataControlField.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SrgsSubset.cs
- EventDrivenDesigner.cs
- SQLSingle.cs
- XPathAncestorQuery.cs
- ReferentialConstraint.cs
- TypeKeyValue.cs
- Executor.cs
- FormClosedEvent.cs
- AutomationElementCollection.cs
- TemplateInstanceAttribute.cs
- DataView.cs
- _ConnectionGroup.cs
- columnmapfactory.cs
- RectAnimationBase.cs
- InvokeGenerator.cs
- EventArgs.cs
- WindowsSysHeader.cs
- VisualBasicSettingsConverter.cs
- ControlBindingsCollection.cs
- Enum.cs
- BaseAsyncResult.cs
- InstanceLockedException.cs
- Crypto.cs
- ConfigurationLocationCollection.cs
- Int16KeyFrameCollection.cs
- FloatUtil.cs
- EventHandlerList.cs
- LinqDataSourceContextEventArgs.cs
- FileLogRecord.cs
- GridViewColumnHeaderAutomationPeer.cs
- WorkflowApplicationTerminatedException.cs
- TextElementCollectionHelper.cs
- TransactionTraceIdentifier.cs
- NumericUpDownAccelerationCollection.cs
- TemplateControlParser.cs
- SystemDiagnosticsSection.cs
- mongolianshape.cs
- MatrixTransform.cs
- FixedMaxHeap.cs
- MasterPageBuildProvider.cs
- ParamArrayAttribute.cs
- HttpCacheVary.cs
- ComplexObject.cs
- ConfigXmlCDataSection.cs
- ErrorEventArgs.cs
- ImageDrawing.cs
- WebDescriptionAttribute.cs
- SuppressMergeCheckAttribute.cs
- CompressStream.cs
- SamlConditions.cs
- RangeContentEnumerator.cs
- WebPartConnectionsCancelEventArgs.cs
- NativeMethodsCLR.cs
- LeafCellTreeNode.cs
- EdmItemCollection.cs
- SmtpDigestAuthenticationModule.cs
- NavigationEventArgs.cs
- InternalDuplexBindingElement.cs
- DefaultEventAttribute.cs
- XamlContextStack.cs
- Select.cs
- CaseStatement.cs
- HttpPostProtocolReflector.cs
- HttpResponseWrapper.cs
- AbandonedMutexException.cs
- ConnectionsZone.cs
- ParseChildrenAsPropertiesAttribute.cs
- ViewUtilities.cs
- RepeaterItemCollection.cs
- Nodes.cs
- CodeDOMProvider.cs
- SqlEnums.cs
- DataGridViewColumnConverter.cs
- CopyAttributesAction.cs
- AsyncPostBackTrigger.cs
- ConcurrentStack.cs
- RawMouseInputReport.cs
- TypeUtils.cs
- OracleSqlParser.cs
- PointHitTestParameters.cs
- XmlArrayItemAttributes.cs
- ClickablePoint.cs
- LayoutInformation.cs
- Binding.cs
- FormViewModeEventArgs.cs
- SqlRowUpdatedEvent.cs
- StylusPointDescription.cs