Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / MIT / System / Web / UI / MobileControls / DesignerDeviceConfig.cs / 1305376 / DesignerDeviceConfig.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Web.UI.MobileControls.Adapters; using System.Web.Util; namespace System.Web.UI.MobileControls { // Data structure for a specialized version of IndividualDeviceConfig, // used in design mode. [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] class DesignerDeviceConfig : IndividualDeviceConfig { internal DesignerDeviceConfig(String pageAdapterType) : base(Type.GetType (pageAdapterType)) { } internal override IControlAdapter NewControlAdapter(Type originalControlType) { IControlAdapter adapter; IWebObjectFactory adapterFactory = LookupControl(originalControlType); if (adapterFactory != null) { adapter = (IControlAdapter) adapterFactory.CreateInstance(); } else { DesignerAdapterAttribute da; da = (DesignerAdapterAttribute) TypeDescriptor.GetAttributes(originalControlType) [typeof(DesignerAdapterAttribute)]; if (da == null) { return new EmptyControlAdapter(); } Type adapterType = Type.GetType(da.TypeName); if (adapterType == null) { return new EmptyControlAdapter(); } adapter = Activator.CreateInstance(adapterType) as IControlAdapter; } if (adapter == null) { adapter = new EmptyControlAdapter(); } return adapter; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Web.UI.MobileControls.Adapters; using System.Web.Util; namespace System.Web.UI.MobileControls { // Data structure for a specialized version of IndividualDeviceConfig, // used in design mode. [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] class DesignerDeviceConfig : IndividualDeviceConfig { internal DesignerDeviceConfig(String pageAdapterType) : base(Type.GetType (pageAdapterType)) { } internal override IControlAdapter NewControlAdapter(Type originalControlType) { IControlAdapter adapter; IWebObjectFactory adapterFactory = LookupControl(originalControlType); if (adapterFactory != null) { adapter = (IControlAdapter) adapterFactory.CreateInstance(); } else { DesignerAdapterAttribute da; da = (DesignerAdapterAttribute) TypeDescriptor.GetAttributes(originalControlType) [typeof(DesignerAdapterAttribute)]; if (da == null) { return new EmptyControlAdapter(); } Type adapterType = Type.GetType(da.TypeName); if (adapterType == null) { return new EmptyControlAdapter(); } adapter = Activator.CreateInstance(adapterType) as IControlAdapter; } if (adapter == null) { adapter = new EmptyControlAdapter(); } return adapter; } } } // 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
- ResolvedKeyFrameEntry.cs
- ProtocolsConfigurationHandler.cs
- TextRunTypographyProperties.cs
- bindurihelper.cs
- XmlCDATASection.cs
- FloaterParagraph.cs
- NativeMethods.cs
- Contracts.cs
- PanelContainerDesigner.cs
- MSAAEventDispatcher.cs
- Brush.cs
- DbParameterHelper.cs
- XMLDiffLoader.cs
- LayoutTable.cs
- FileLoadException.cs
- HitTestFilterBehavior.cs
- StringAnimationBase.cs
- TypedElement.cs
- ComponentTray.cs
- TrackingMemoryStreamFactory.cs
- BitConverter.cs
- Timeline.cs
- FillRuleValidation.cs
- Binding.cs
- PreviewPrintController.cs
- SmtpReplyReaderFactory.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- NamedPipeConnectionPool.cs
- ObjectStateManagerMetadata.cs
- TextTabProperties.cs
- ValueTypeFixupInfo.cs
- WebPartMovingEventArgs.cs
- Facet.cs
- EntityDescriptor.cs
- LookupBindingPropertiesAttribute.cs
- WebPartCatalogAddVerb.cs
- FrameDimension.cs
- SystemInfo.cs
- TransformPatternIdentifiers.cs
- Pen.cs
- VisualStyleTypesAndProperties.cs
- PerformanceCounterNameAttribute.cs
- ValueSerializerAttribute.cs
- DataGridViewMethods.cs
- PersonalizationStateInfo.cs
- TitleStyle.cs
- ExtractedStateEntry.cs
- NumberFunctions.cs
- GeometryCombineModeValidation.cs
- ZipIOLocalFileBlock.cs
- RequiredAttributeAttribute.cs
- ImageCollectionEditor.cs
- DBBindings.cs
- SchemaContext.cs
- XmlCDATASection.cs
- BlockingCollection.cs
- OpCodes.cs
- PathGeometry.cs
- HttpConfigurationSystem.cs
- RoleGroupCollection.cs
- BlockCollection.cs
- TextServicesCompartmentEventSink.cs
- DbConnectionPoolGroupProviderInfo.cs
- UnmanagedMemoryAccessor.cs
- ExternalFile.cs
- StylusPointPropertyInfoDefaults.cs
- FormViewCommandEventArgs.cs
- DataConnectionHelper.cs
- JoinGraph.cs
- EntityTransaction.cs
- XmlSchemaSimpleContent.cs
- WinCategoryAttribute.cs
- TextStore.cs
- StructuredTypeEmitter.cs
- MenuItem.cs
- TrackBarRenderer.cs
- DispatcherTimer.cs
- Brush.cs
- SystemIPInterfaceStatistics.cs
- CodeCompiler.cs
- mediaeventargs.cs
- SafeFileHandle.cs
- odbcmetadatacolumnnames.cs
- SrgsGrammar.cs
- ColumnWidthChangedEvent.cs
- ContainsRowNumberChecker.cs
- CreateUserErrorEventArgs.cs
- WebGetAttribute.cs
- DataGridViewColumnStateChangedEventArgs.cs
- Int32Animation.cs
- XmlAtomErrorReader.cs
- StringExpressionSet.cs
- RepeaterDataBoundAdapter.cs
- LayoutTable.cs
- ColorConvertedBitmap.cs
- DataRelationCollection.cs
- HashRepartitionStream.cs
- GeneralTransform3DTo2DTo3D.cs
- DbgCompiler.cs
- Operand.cs