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
- WebPartsPersonalization.cs
- AuthenticateEventArgs.cs
- UnmanagedMemoryStream.cs
- CodeNamespaceImport.cs
- HttpCacheParams.cs
- Int64Converter.cs
- SchemaManager.cs
- ClientProtocol.cs
- XmlSchemaAttribute.cs
- Rotation3D.cs
- SecureStringHasher.cs
- OverflowException.cs
- DataRowChangeEvent.cs
- _Semaphore.cs
- JobDuplex.cs
- FixedSOMLineRanges.cs
- ListDataBindEventArgs.cs
- CommandID.cs
- XamlGridLengthSerializer.cs
- EntityDescriptor.cs
- CodeGroup.cs
- Rectangle.cs
- AsymmetricKeyExchangeFormatter.cs
- DockingAttribute.cs
- StructuredTypeInfo.cs
- PolicyException.cs
- RegexWriter.cs
- PieceNameHelper.cs
- ProfileProvider.cs
- WebRequestModulesSection.cs
- StaticSiteMapProvider.cs
- TreeView.cs
- AppDomainGrammarProxy.cs
- XmlDomTextWriter.cs
- MemberMaps.cs
- StrokeNode.cs
- DbProviderFactoriesConfigurationHandler.cs
- MulticastDelegate.cs
- DetailsViewInsertEventArgs.cs
- DropDownButton.cs
- ImageButton.cs
- StylusButtonCollection.cs
- Cell.cs
- BaseCodeDomTreeGenerator.cs
- RepeatInfo.cs
- Message.cs
- QueryStatement.cs
- QuadTree.cs
- SafeIUnknown.cs
- DPTypeDescriptorContext.cs
- ProfileProvider.cs
- DrawingVisual.cs
- XmlConvert.cs
- SaveFileDialog.cs
- XmlUnspecifiedAttribute.cs
- Memoizer.cs
- XmlElementAttribute.cs
- rsa.cs
- PaintEvent.cs
- CustomPopupPlacement.cs
- WebAdminConfigurationHelper.cs
- CompareValidator.cs
- COM2Enum.cs
- TextParagraph.cs
- PropertyConverter.cs
- QueryContinueDragEvent.cs
- ToolBarButtonClickEvent.cs
- RightNameExpirationInfoPair.cs
- ListViewEditEventArgs.cs
- NativeWindow.cs
- PeerNameResolver.cs
- ToolStripProgressBar.cs
- AssociativeAggregationOperator.cs
- AsymmetricSignatureFormatter.cs
- DeviceContext.cs
- KnownBoxes.cs
- EncryptedXml.cs
- SqlClientWrapperSmiStreamChars.cs
- cookie.cs
- SetterBaseCollection.cs
- DocumentAutomationPeer.cs
- CfgRule.cs
- VisualStyleElement.cs
- TypedColumnHandler.cs
- OwnerDrawPropertyBag.cs
- LinqDataSource.cs
- HighlightComponent.cs
- Compiler.cs
- updatecommandorderer.cs
- Timer.cs
- IdentityValidationException.cs
- WsdlInspector.cs
- SystemIcmpV4Statistics.cs
- MarkupExtensionParser.cs
- Stack.cs
- SmiXetterAccessMap.cs
- WindowsListBox.cs
- TdsValueSetter.cs
- RuntimeResourceSet.cs
- SiteMapNode.cs