Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDataSourceContainerNameConverter.cs / 1305376 / EntityDataSourceContainerNameConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.Design; using System.Diagnostics; using System.Web.UI.WebControls; namespace System.Web.UI.Design.WebControls { internal class EntityDataSourceContainerNameConverter : StringConverter { public EntityDataSourceContainerNameConverter() : base() { } public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { // We can only get a list of possible DefaultContainerName values if we have: // (1) Connection string so we can load metadata // Even if this value is set, it may not be possible to actually load the metadata, but at least we can try the lookup if requested EntityDataSource entityDataSource = context.Instance as EntityDataSource; if (entityDataSource != null && !String.IsNullOrEmpty(entityDataSource.ConnectionString)) { ListcontainerNameItems = new EntityDataSourceDesignerHelper(entityDataSource, false /*interactiveMode*/).GetContainerNames(true /*sortResults*/); string[] containers = new string[containerNameItems.Count]; for (int i = 0; i < containerNameItems.Count; i++) { containers[i] = containerNameItems[i].ToString(); } return new StandardValuesCollection(containers); } return null; } 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InputBinding.cs
- CollectionsUtil.cs
- HighlightVisual.cs
- Internal.cs
- ContravarianceAdapter.cs
- PackageDigitalSignatureManager.cs
- ErrorStyle.cs
- BitmapEffectInput.cs
- AttributeEmitter.cs
- ActivatableWorkflowsQueryResult.cs
- PartialArray.cs
- BitmapEffectInput.cs
- ProjectionNode.cs
- SHA1.cs
- WsdlInspector.cs
- CachedPathData.cs
- ViewService.cs
- LineSegment.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- BitmapSourceSafeMILHandle.cs
- EntityDesignerDataSourceView.cs
- CodeArrayCreateExpression.cs
- BoolExpr.cs
- TdsParameterSetter.cs
- RulePatternOps.cs
- SqlInternalConnectionSmi.cs
- webeventbuffer.cs
- DataRowExtensions.cs
- TextServicesCompartment.cs
- XmlSchemaSimpleContent.cs
- LZCodec.cs
- SelfIssuedAuthAsymmetricKey.cs
- ColorDialog.cs
- OSFeature.cs
- DataObjectSettingDataEventArgs.cs
- GridViewEditEventArgs.cs
- SubqueryRules.cs
- CalendarDateChangedEventArgs.cs
- ImageAnimator.cs
- BoolExpr.cs
- XmlSchemaInclude.cs
- PanelStyle.cs
- GuidelineSet.cs
- SqlClientMetaDataCollectionNames.cs
- webeventbuffer.cs
- X509Utils.cs
- EventBuilder.cs
- CollectionBuilder.cs
- SymmetricKeyWrap.cs
- Debug.cs
- TextBox.cs
- SimpleColumnProvider.cs
- RecordBuilder.cs
- NativeMethods.cs
- TabControl.cs
- ScrollPattern.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- FontWeights.cs
- CrossAppDomainChannel.cs
- TextRunTypographyProperties.cs
- Switch.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- COM2EnumConverter.cs
- MailFileEditor.cs
- Trigger.cs
- ScriptControlManager.cs
- TableHeaderCell.cs
- ProxyHwnd.cs
- DesignerAutoFormat.cs
- HtmlElementEventArgs.cs
- AutomationPatternInfo.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- DataControlFieldCollection.cs
- TransformDescriptor.cs
- FormViewRow.cs
- Knowncolors.cs
- FontDriver.cs
- ColorConvertedBitmapExtension.cs
- RemotingConfigParser.cs
- TypeTypeConverter.cs
- IImplicitResourceProvider.cs
- HttpClientCertificate.cs
- GAC.cs
- CommandSet.cs
- TreeNodeMouseHoverEvent.cs
- ServiceOperationDetailViewControl.cs
- MultipleFilterMatchesException.cs
- ListBox.cs
- GroupBoxRenderer.cs
- ErrorFormatter.cs
- XamlPointCollectionSerializer.cs
- StorageAssociationSetMapping.cs
- RepeatInfo.cs
- FeatureAttribute.cs
- COM2ComponentEditor.cs
- AdRotator.cs
- LogEntryHeaderSerializer.cs
- ZoneLinkButton.cs
- WSDualHttpSecurity.cs
- EmptyReadOnlyDictionaryInternal.cs