Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Markup / TemplateComponentConnector.cs / 1 / TemplateComponentConnector.cs
/****************************************************************************\ * * File: OptimizedTemplateComponentConnector.cs * * Purpose: Provides an IComponentConnector which is used in instantiation * of optimized template content. * * Copyright (C) 2005 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.Xml; using System.IO; using System.Windows; using System.Windows.Media; using System.Windows.Navigation; using System.Text; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media.Animation; using System.Diagnostics; using System.Reflection; using System.Windows.Threading; using System.Windows.Data; using System.Globalization; using MS.Utility; namespace System.Windows.Markup { // This class provides an IComponentConnector implementation for use during instantiation // of optimized template content. It is given an IComponentConnector, and most calls are // just forwarded to it. But it is also given an IStyleConnector, and calls to Connect // are sent there instead. internal class TemplateComponentConnector : IComponentConnector { internal TemplateComponentConnector( IComponentConnector componentConnector, IStyleConnector styleConnector ) { _styleConnector = styleConnector; _componentConnector = componentConnector; } public void InitializeComponent() { _componentConnector.InitializeComponent(); } public void Connect(int connectionId, object target) { // Calls to IComponentConnector.Connect from template content get forwarded // to the outer style connector (when we have one). if (_styleConnector != null) { _styleConnector.Connect(connectionId, target); } else { _componentConnector.Connect(connectionId, target); } } private IStyleConnector _styleConnector; private IComponentConnector _componentConnector; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. /****************************************************************************\ * * File: OptimizedTemplateComponentConnector.cs * * Purpose: Provides an IComponentConnector which is used in instantiation * of optimized template content. * * Copyright (C) 2005 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.Xml; using System.IO; using System.Windows; using System.Windows.Media; using System.Windows.Navigation; using System.Text; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media.Animation; using System.Diagnostics; using System.Reflection; using System.Windows.Threading; using System.Windows.Data; using System.Globalization; using MS.Utility; namespace System.Windows.Markup { // This class provides an IComponentConnector implementation for use during instantiation // of optimized template content. It is given an IComponentConnector, and most calls are // just forwarded to it. But it is also given an IStyleConnector, and calls to Connect // are sent there instead. internal class TemplateComponentConnector : IComponentConnector { internal TemplateComponentConnector( IComponentConnector componentConnector, IStyleConnector styleConnector ) { _styleConnector = styleConnector; _componentConnector = componentConnector; } public void InitializeComponent() { _componentConnector.InitializeComponent(); } public void Connect(int connectionId, object target) { // Calls to IComponentConnector.Connect from template content get forwarded // to the outer style connector (when we have one). if (_styleConnector != null) { _styleConnector.Connect(connectionId, target); } else { _componentConnector.Connect(connectionId, target); } } private IStyleConnector _styleConnector; private IComponentConnector _componentConnector; } } // 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
- EditorAttribute.cs
- ExtractorMetadata.cs
- OracleCommand.cs
- ClientSponsor.cs
- StreamUpgradeInitiator.cs
- _IPv6Address.cs
- Metadata.cs
- _SecureChannel.cs
- ISAPIApplicationHost.cs
- WindowsListViewSubItem.cs
- GregorianCalendar.cs
- Soap.cs
- InvalidOperationException.cs
- TextEditorCharacters.cs
- AdjustableArrowCap.cs
- EDesignUtil.cs
- MsmqChannelFactory.cs
- RangeContentEnumerator.cs
- UniqueIdentifierService.cs
- _FtpDataStream.cs
- InternalMappingException.cs
- SymDocumentType.cs
- ComAdminWrapper.cs
- Window.cs
- WindowsStatusBar.cs
- UTF32Encoding.cs
- Rotation3DAnimationUsingKeyFrames.cs
- NegotiateStream.cs
- SQLChars.cs
- TextEditor.cs
- PersonalizablePropertyEntry.cs
- Set.cs
- ProtocolsConfigurationHandler.cs
- XmlChildNodes.cs
- SubclassTypeValidatorAttribute.cs
- ImageAttributes.cs
- ContentControl.cs
- SafeLocalMemHandle.cs
- CellCreator.cs
- RestHandler.cs
- baseaxisquery.cs
- MemoryPressure.cs
- NullableDecimalSumAggregationOperator.cs
- SqlCacheDependencyDatabase.cs
- SafeRightsManagementPubHandle.cs
- RequestCacheValidator.cs
- RtType.cs
- Internal.cs
- UserMapPath.cs
- MessageEventSubscriptionService.cs
- DataSpaceManager.cs
- ListDictionaryInternal.cs
- EntityDataSourceStatementEditorForm.cs
- InProcStateClientManager.cs
- CheckBoxList.cs
- DateTimeSerializationSection.cs
- FilterableAttribute.cs
- SmiMetaDataProperty.cs
- DataFieldConverter.cs
- NavigatorInput.cs
- ThaiBuddhistCalendar.cs
- UnmanagedMemoryStreamWrapper.cs
- OdbcConnectionFactory.cs
- ProfileServiceManager.cs
- ProcessModuleCollection.cs
- DateBoldEvent.cs
- DbParameterCollection.cs
- AccessControlEntry.cs
- AmbientLight.cs
- SafeNativeMethodsMilCoreApi.cs
- AnnotationHighlightLayer.cs
- TransformerInfo.cs
- HttpContext.cs
- Lease.cs
- SchemaImporterExtensionElement.cs
- TextRange.cs
- TableLayout.cs
- MethodToken.cs
- FragmentQueryKB.cs
- XmlIterators.cs
- XmlLoader.cs
- CreateParams.cs
- OleDbConnectionFactory.cs
- Geometry3D.cs
- WSSecureConversation.cs
- XmlSchemaAny.cs
- XmlAttribute.cs
- TreeNodeStyleCollection.cs
- EntityWithKeyStrategy.cs
- BatchServiceHost.cs
- CursorConverter.cs
- SkinIDTypeConverter.cs
- HttpVersion.cs
- TraceSource.cs
- DataKey.cs
- SmtpSection.cs
- InitializingNewItemEventArgs.cs
- mda.cs
- invalidudtexception.cs
- DataSourceHelper.cs