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
- WebSysDisplayNameAttribute.cs
- XmlQualifiedNameTest.cs
- Localizer.cs
- TogglePattern.cs
- WsdlEndpointConversionContext.cs
- regiisutil.cs
- TypeConverterAttribute.cs
- RoleManagerSection.cs
- DataGridViewDataConnection.cs
- SafeRegistryHandle.cs
- FactoryMaker.cs
- RegularExpressionValidator.cs
- ModelEditingScope.cs
- DBConnectionString.cs
- ListView.cs
- QueuePathEditor.cs
- DBBindings.cs
- WmlLinkAdapter.cs
- SafeMILHandle.cs
- RegexFCD.cs
- TextEditorThreadLocalStore.cs
- HideDisabledControlAdapter.cs
- Native.cs
- SafeNativeMethods.cs
- StatusBar.cs
- EntityClientCacheEntry.cs
- CommandTreeTypeHelper.cs
- Currency.cs
- ScrollBarRenderer.cs
- XmlTypeMapping.cs
- OdbcUtils.cs
- SystemPens.cs
- Literal.cs
- HostProtectionPermission.cs
- Memoizer.cs
- DragCompletedEventArgs.cs
- ResourceDescriptionAttribute.cs
- listitem.cs
- DeadCharTextComposition.cs
- MulticastNotSupportedException.cs
- SystemWebSectionGroup.cs
- ConfigurationValidatorAttribute.cs
- CompareInfo.cs
- _Rfc2616CacheValidators.cs
- KeyToListMap.cs
- EventArgs.cs
- DispatcherOperation.cs
- Bits.cs
- SearchForVirtualItemEventArgs.cs
- TraceLog.cs
- SchemaCollectionCompiler.cs
- FormsAuthenticationConfiguration.cs
- QilLiteral.cs
- TreeNodeConverter.cs
- ValidationErrorCollection.cs
- ValidationSummary.cs
- ReadOnlyCollection.cs
- DecryptRequest.cs
- UIElement.cs
- VariantWrapper.cs
- ProviderConnectionPoint.cs
- AttachedPropertyMethodSelector.cs
- ContentTextAutomationPeer.cs
- PassportPrincipal.cs
- MouseCaptureWithinProperty.cs
- LogExtent.cs
- PenContext.cs
- connectionpool.cs
- PageAsyncTaskManager.cs
- InternalsVisibleToAttribute.cs
- HttpApplicationFactory.cs
- SqlResolver.cs
- NativeCppClassAttribute.cs
- ScrollableControl.cs
- HttpCapabilitiesBase.cs
- Int32RectConverter.cs
- TrustLevelCollection.cs
- SerialErrors.cs
- XmlMemberMapping.cs
- CustomErrorsSection.cs
- BooleanExpr.cs
- OpenTypeLayoutCache.cs
- LinqMaximalSubtreeNominator.cs
- XComponentModel.cs
- Range.cs
- RawStylusInput.cs
- TdsParserHelperClasses.cs
- SectionVisual.cs
- DESCryptoServiceProvider.cs
- EntitySqlQueryState.cs
- PowerStatus.cs
- UpdateException.cs
- SystemIPv6InterfaceProperties.cs
- SchemaMapping.cs
- Point4D.cs
- ParallelTimeline.cs
- OpCellTreeNode.cs
- SoapConverter.cs
- RegexCompiler.cs
- AttributeInfo.cs