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
- PersistNameAttribute.cs
- NullableIntSumAggregationOperator.cs
- CompiledQueryCacheKey.cs
- ApplicationDirectoryMembershipCondition.cs
- ReleaseInstanceMode.cs
- CodeNamespaceImport.cs
- IisTraceWebEventProvider.cs
- DnsEndPoint.cs
- CardSpaceShim.cs
- ListViewSortEventArgs.cs
- EventTrigger.cs
- RangeContentEnumerator.cs
- ProviderIncompatibleException.cs
- FieldNameLookup.cs
- RawStylusInputCustomDataList.cs
- ModifyActivitiesPropertyDescriptor.cs
- _RequestCacheProtocol.cs
- MeasureItemEvent.cs
- DbConnectionPoolGroup.cs
- GridLength.cs
- MessageQueue.cs
- WindowsListViewGroupHelper.cs
- UniqueEventHelper.cs
- ObjectPersistData.cs
- CompressedStack.cs
- EndOfStreamException.cs
- StorageInfo.cs
- SafeCryptoHandles.cs
- InvalidAsynchronousStateException.cs
- RouteTable.cs
- Solver.cs
- ExecutionContext.cs
- XamlHostingSection.cs
- TagNameToTypeMapper.cs
- COAUTHIDENTITY.cs
- CommandBindingCollection.cs
- HttpListenerException.cs
- ImmutableObjectAttribute.cs
- QueryOperationResponseOfT.cs
- SchemaElementLookUpTable.cs
- BrushProxy.cs
- ITextView.cs
- LassoSelectionBehavior.cs
- CompositeScriptReference.cs
- XmlNamespaceManager.cs
- TriggerAction.cs
- SettingsPropertyCollection.cs
- ConfigErrorGlyph.cs
- SqlCacheDependencyDatabase.cs
- HwndKeyboardInputProvider.cs
- BindToObject.cs
- AdRotator.cs
- ListenUriMode.cs
- ChameleonKey.cs
- AsyncPostBackTrigger.cs
- MergeLocalizationDirectives.cs
- DataListDesigner.cs
- InternalConfigSettingsFactory.cs
- ControlTemplate.cs
- AnnotationHighlightLayer.cs
- ViewCellRelation.cs
- DataListItemEventArgs.cs
- IPAddress.cs
- OleDbErrorCollection.cs
- odbcmetadatafactory.cs
- EventSource.cs
- DataGrid.cs
- SurrogateEncoder.cs
- CacheAxisQuery.cs
- DebugView.cs
- SafeRightsManagementSessionHandle.cs
- ObjectSet.cs
- Multiply.cs
- SubclassTypeValidatorAttribute.cs
- NativeMethods.cs
- EnterpriseServicesHelper.cs
- ContentType.cs
- TemplateControlParser.cs
- OletxEnlistment.cs
- UserPreferenceChangedEventArgs.cs
- TableParaClient.cs
- PointAnimationUsingKeyFrames.cs
- TextViewBase.cs
- MultiPartWriter.cs
- WithParamAction.cs
- ReservationCollection.cs
- XsdDataContractImporter.cs
- UIElementParagraph.cs
- FirewallWrapper.cs
- ElementHost.cs
- WindowsSysHeader.cs
- RouteParser.cs
- AddingNewEventArgs.cs
- Frame.cs
- SecUtil.cs
- InternalBase.cs
- BaseDataList.cs
- SqlConnectionString.cs
- BamlRecordReader.cs
- ComboBoxAutomationPeer.cs