Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / DataProviderNameConverter.cs / 1 / DataProviderNameConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls { using System.ComponentModel; using System.Collections; using System.Data; using System.Data.Common; using System.Diagnostics; using System.Globalization; using System.Web.UI.WebControls; ////// Creates a user-selectable list of ADO.net provider names. /// The providers are factories to create System.Data objects. /// public class DataProviderNameConverter : StringConverter { ////// Returns a list of the user-friendly provider names. /// public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { DataTable providerTable = DbProviderFactories.GetFactoryClasses(); DataRowCollection rows = providerTable.Rows; string[] providerNames = new string[rows.Count]; for (int i = 0; i < rows.Count; i++) { providerNames[i] = (string)rows[i]["InvariantName"]; } return new StandardValuesCollection(providerNames); } ////// public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) { return false; } ////// public override bool GetStandardValuesSupported(ITypeDescriptorContext context) { return true; } } } // 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
- LoginViewDesigner.cs
- NamedElement.cs
- ZipIOModeEnforcingStream.cs
- Solver.cs
- HttpGetProtocolImporter.cs
- ModifyActivitiesPropertyDescriptor.cs
- RoutedPropertyChangedEventArgs.cs
- XmlWriterSettings.cs
- documentation.cs
- NetPipeSection.cs
- arc.cs
- DeleteMemberBinder.cs
- TextEncodedRawTextWriter.cs
- Matrix3DStack.cs
- ToolStripSplitButton.cs
- NativeMethods.cs
- PageBuildProvider.cs
- TypedRowHandler.cs
- GradientSpreadMethodValidation.cs
- XmlDataProvider.cs
- IntAverageAggregationOperator.cs
- VisualTarget.cs
- RadioButtonList.cs
- SymmetricAlgorithm.cs
- XmlILStorageConverter.cs
- COM2Enum.cs
- MenuAutoFormat.cs
- ListViewSortEventArgs.cs
- ControlsConfig.cs
- Clock.cs
- WSHttpBinding.cs
- FileLogRecord.cs
- HttpCachePolicy.cs
- InputProcessorProfilesLoader.cs
- DataGridTextBoxColumn.cs
- WebBrowserDocumentCompletedEventHandler.cs
- ProcessInputEventArgs.cs
- TraceSection.cs
- KeyPullup.cs
- SelectionManager.cs
- FormsAuthenticationTicket.cs
- ListViewGroupItemCollection.cs
- ProjectionNode.cs
- HGlobalSafeHandle.cs
- UserPreferenceChangedEventArgs.cs
- InputScopeAttribute.cs
- TrackingCondition.cs
- NotifyInputEventArgs.cs
- RecipientInfo.cs
- TypeLibConverter.cs
- TreeNodeCollection.cs
- TextParagraphView.cs
- EdmFunction.cs
- ConfigurationValidatorAttribute.cs
- SystemIPv4InterfaceProperties.cs
- _SslStream.cs
- EdmValidator.cs
- RuntimeVariableList.cs
- ServiceAuthorizationBehavior.cs
- httpapplicationstate.cs
- FormsIdentity.cs
- DependencyObjectPropertyDescriptor.cs
- VisualBasicImportReference.cs
- IItemProperties.cs
- XmlTextAttribute.cs
- ListSortDescription.cs
- handlecollector.cs
- SvcMapFileSerializer.cs
- XmlILAnnotation.cs
- Profiler.cs
- ObjectMemberMapping.cs
- HandlerBase.cs
- RMEnrollmentPage3.cs
- sqlmetadatafactory.cs
- WindowsListViewGroupHelper.cs
- DBParameter.cs
- KeyValueConfigurationElement.cs
- ProcessDesigner.cs
- EventRoute.cs
- DataGridDesigner.cs
- EarlyBoundInfo.cs
- SettingsBindableAttribute.cs
- SqlDataSourceCommandEventArgs.cs
- MemberExpression.cs
- BitmapEffectGroup.cs
- SaveFileDialog.cs
- PriorityChain.cs
- DesignerVerb.cs
- StorageMappingItemLoader.cs
- EdmMember.cs
- safelinkcollection.cs
- DataObjectFieldAttribute.cs
- MenuTracker.cs
- HelpKeywordAttribute.cs
- ConnectionsZone.cs
- RuleSettingsCollection.cs
- TreeView.cs
- CodeAccessPermission.cs
- HMACSHA1.cs
- SqlDataSourceFilteringEventArgs.cs