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
- ObjectViewFactory.cs
- TrustExchangeException.cs
- xml.cs
- Effect.cs
- BinaryEditor.cs
- ToolStripPanelRow.cs
- FileDialog_Vista.cs
- HuffmanTree.cs
- PropertyStore.cs
- XmlCountingReader.cs
- TransactionTraceIdentifier.cs
- FilterUserControlBase.cs
- HyperLinkStyle.cs
- MDIControlStrip.cs
- KeyValueSerializer.cs
- CheckoutException.cs
- TabItem.cs
- DetailsViewInsertedEventArgs.cs
- WebRequestModuleElementCollection.cs
- NavigationCommands.cs
- DependencyObject.cs
- FunctionCommandText.cs
- MetaDataInfo.cs
- PolyQuadraticBezierSegment.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- EdgeModeValidation.cs
- LinkTarget.cs
- PartitionerStatic.cs
- PocoEntityKeyStrategy.cs
- AutoGeneratedField.cs
- SplitterCancelEvent.cs
- SweepDirectionValidation.cs
- CodeGotoStatement.cs
- DataGridViewCellCancelEventArgs.cs
- ConfigurationFileMap.cs
- CodeGenerator.cs
- EditorResources.cs
- PreservationFileWriter.cs
- basenumberconverter.cs
- RandomDelaySendsAsyncResult.cs
- DetailsViewUpdateEventArgs.cs
- ToolStripRenderer.cs
- CodeDOMProvider.cs
- DataGridViewComboBoxEditingControl.cs
- DataServiceHostFactory.cs
- XXXInfos.cs
- NumericUpDownAcceleration.cs
- UrlMappingsModule.cs
- IncomingWebResponseContext.cs
- HotSpotCollection.cs
- TrustLevel.cs
- PropertyChangingEventArgs.cs
- SafeRightsManagementQueryHandle.cs
- SafeMILHandle.cs
- AspCompat.cs
- AttributeAction.cs
- UInt64.cs
- Crc32.cs
- ApplicationInfo.cs
- XmlSignificantWhitespace.cs
- RelationshipManager.cs
- CodeNamespaceCollection.cs
- CatalogPartCollection.cs
- XhtmlBasicListAdapter.cs
- PageRouteHandler.cs
- Message.cs
- HandlerFactoryCache.cs
- BaseValidator.cs
- Vector.cs
- VolatileEnlistmentMultiplexing.cs
- QilPatternVisitor.cs
- ParserStreamGeometryContext.cs
- VariableDesigner.xaml.cs
- ProvidePropertyAttribute.cs
- TextBoxAutoCompleteSourceConverter.cs
- OutputCacheSection.cs
- View.cs
- ExpressionNormalizer.cs
- MetadataImporter.cs
- MeshGeometry3D.cs
- StorageComplexTypeMapping.cs
- TextEditorThreadLocalStore.cs
- RTTrackingProfile.cs
- GlyphTypeface.cs
- HebrewNumber.cs
- XmlTextWriter.cs
- CorrelationQuery.cs
- InfoCardSymmetricCrypto.cs
- StoreItemCollection.cs
- Quad.cs
- clipboard.cs
- PointLight.cs
- Int32Rect.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ControlCachePolicy.cs
- ComplexPropertyEntry.cs
- Stackframe.cs
- webproxy.cs
- DataObjectEventArgs.cs
- DisplayNameAttribute.cs