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
- CurrentChangingEventManager.cs
- CompleteWizardStep.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- MsmqAppDomainProtocolHandler.cs
- SmiEventStream.cs
- RotationValidation.cs
- SamlDelegatingWriter.cs
- CodeRemoveEventStatement.cs
- BulletedList.cs
- ConfigurationLockCollection.cs
- Delegate.cs
- NameTable.cs
- CompilerErrorCollection.cs
- FrameAutomationPeer.cs
- TextBreakpoint.cs
- LoginView.cs
- TabControl.cs
- Metadata.cs
- ClientBuildManagerCallback.cs
- Utils.cs
- LicFileLicenseProvider.cs
- CheckableControlBaseAdapter.cs
- HttpListenerResponse.cs
- MediaCommands.cs
- FormViewRow.cs
- GetUserPreferenceRequest.cs
- ScopedMessagePartSpecification.cs
- InternalBufferOverflowException.cs
- ProviderSettings.cs
- SqlRewriteScalarSubqueries.cs
- WsdlInspector.cs
- Triplet.cs
- HandleCollector.cs
- TextUtf8RawTextWriter.cs
- SessionStateItemCollection.cs
- SmiTypedGetterSetter.cs
- ReadOnlyDictionary.cs
- EDesignUtil.cs
- Int64Storage.cs
- CategoryAttribute.cs
- ResizingMessageFilter.cs
- FontFamilyIdentifier.cs
- CodeNamespaceCollection.cs
- LayoutUtils.cs
- ColumnReorderedEventArgs.cs
- SqlProfileProvider.cs
- InternalTypeHelper.cs
- basevalidator.cs
- BaseServiceProvider.cs
- RewritingProcessor.cs
- XmlAttributeCollection.cs
- CodeGen.cs
- TraceContext.cs
- PropertyRecord.cs
- WindowsToolbar.cs
- InternalDispatchObject.cs
- WebPartTransformerCollection.cs
- RepeatBehaviorConverter.cs
- SoapProtocolReflector.cs
- PrintDocument.cs
- ComponentCommands.cs
- ActiveDocumentEvent.cs
- LinqDataSourceView.cs
- DirectoryInfo.cs
- SHA512Managed.cs
- FontFamilyValueSerializer.cs
- CriticalHandle.cs
- DatagridviewDisplayedBandsData.cs
- PropertyGrid.cs
- AutomationPeer.cs
- HyperLinkStyle.cs
- TextEmbeddedObject.cs
- ProtocolsSection.cs
- Range.cs
- DataSourceProvider.cs
- AlternateViewCollection.cs
- SplitterPanel.cs
- ToolStripItemEventArgs.cs
- StateDesignerConnector.cs
- xmlglyphRunInfo.cs
- RenderDataDrawingContext.cs
- NativeMethods.cs
- QueryableDataSourceEditData.cs
- SweepDirectionValidation.cs
- WebServiceData.cs
- BindingList.cs
- TagPrefixAttribute.cs
- MetaType.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- xamlnodes.cs
- RowParagraph.cs
- WebRequest.cs
- SQLResource.cs
- RemoteCryptoSignHashRequest.cs
- ObjectSet.cs
- BitmapEffectRenderDataResource.cs
- BufferModeSettings.cs
- XPathException.cs
- IdentityNotMappedException.cs
- GeneratedCodeAttribute.cs