Code:
/ FX-1434 / FX-1434 / 1.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
- PhoneCallDesigner.cs
- ClientSideQueueItem.cs
- wmiprovider.cs
- Soap.cs
- EdmToObjectNamespaceMap.cs
- TypeListConverter.cs
- LogReservationCollection.cs
- EntitySqlQueryCacheEntry.cs
- IsolatedStorageException.cs
- ActivationServices.cs
- CustomAttributeSerializer.cs
- FileUpload.cs
- UniqueIdentifierService.cs
- ValidationErrorCollection.cs
- AbandonedMutexException.cs
- VersionedStreamOwner.cs
- figurelength.cs
- IISUnsafeMethods.cs
- WebPartEditorCancelVerb.cs
- __Filters.cs
- XmlSchemaElement.cs
- KeyManager.cs
- HtmlPanelAdapter.cs
- DisposableCollectionWrapper.cs
- DefaultPrintController.cs
- XhtmlBasicFormAdapter.cs
- XamlStream.cs
- WebPartConnectionsDisconnectVerb.cs
- HostingEnvironment.cs
- DesignerTransaction.cs
- cookiecollection.cs
- X509RecipientCertificateServiceElement.cs
- OrderByBuilder.cs
- ProgressBarBrushConverter.cs
- CodeDomLoader.cs
- WebPartsSection.cs
- Collection.cs
- VariableDesigner.xaml.cs
- arc.cs
- TypeElement.cs
- WSDualHttpBindingCollectionElement.cs
- HtmlGenericControl.cs
- WebUtility.cs
- EncodingNLS.cs
- NamedElement.cs
- DictionaryCustomTypeDescriptor.cs
- BindableTemplateBuilder.cs
- PrinterUnitConvert.cs
- WebBaseEventKeyComparer.cs
- PopOutPanel.cs
- SecurityTokenAttachmentMode.cs
- DataControlFieldHeaderCell.cs
- MediaTimeline.cs
- DataGridViewCellStyleChangedEventArgs.cs
- IMembershipProvider.cs
- XmlValidatingReader.cs
- TraceContext.cs
- _NativeSSPI.cs
- DesignerHelpers.cs
- SQLBinaryStorage.cs
- QueryCacheEntry.cs
- DateTimeOffsetConverter.cs
- Brush.cs
- ipaddressinformationcollection.cs
- XmlWrappingWriter.cs
- SystemWebSectionGroup.cs
- DivideByZeroException.cs
- Identifier.cs
- SqlUtils.cs
- HtmlTableRow.cs
- bidPrivateBase.cs
- CommonXSendMessage.cs
- EventProviderClassic.cs
- CustomAssemblyResolver.cs
- InstanceCollisionException.cs
- DictionaryTraceRecord.cs
- ControlOperationInvoker.cs
- CustomError.cs
- ConnectionStringEditor.cs
- ClickablePoint.cs
- EventLogPermissionAttribute.cs
- Light.cs
- SpecialFolderEnumConverter.cs
- MessageCredentialType.cs
- CompositeCollection.cs
- COM2Enum.cs
- NavigationWindowAutomationPeer.cs
- SqlReferenceCollection.cs
- NameSpaceExtractor.cs
- SrgsElementList.cs
- FontEditor.cs
- categoryentry.cs
- MouseGestureConverter.cs
- WorkflowNamespace.cs
- mda.cs
- XmlQuerySequence.cs
- ActivityCodeDomSerializationManager.cs
- CLRBindingWorker.cs
- SqlInternalConnectionSmi.cs
- HostedAspNetEnvironment.cs