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
- TemplateNameScope.cs
- ShaderEffect.cs
- CompressionTransform.cs
- BufferModesCollection.cs
- ContextMenuStrip.cs
- SafeSystemMetrics.cs
- ActivityTypeResolver.xaml.cs
- XmlSchemaIdentityConstraint.cs
- FrameworkName.cs
- ConcurrentBag.cs
- ConstructorNeedsTagAttribute.cs
- BindingManagerDataErrorEventArgs.cs
- EntitySetDataBindingList.cs
- UInt16Storage.cs
- ProfileSettingsCollection.cs
- COM2ComponentEditor.cs
- ClientProxyGenerator.cs
- SplitterCancelEvent.cs
- DbParameterCollectionHelper.cs
- DataGridColumnReorderingEventArgs.cs
- OdbcFactory.cs
- DependencyPropertyConverter.cs
- TypedElement.cs
- MappingMetadataHelper.cs
- ListenerAdapter.cs
- StrokeDescriptor.cs
- BaseDataBoundControlDesigner.cs
- Pair.cs
- DataGridViewDataConnection.cs
- WebPartMenu.cs
- WorkflowViewManager.cs
- Stroke2.cs
- SqlRowUpdatingEvent.cs
- UpdateException.cs
- Internal.cs
- SHA384CryptoServiceProvider.cs
- FullTrustAssembliesSection.cs
- Helper.cs
- SafeLibraryHandle.cs
- ChannelServices.cs
- dbenumerator.cs
- HwndMouseInputProvider.cs
- FixedSOMLineCollection.cs
- LambdaCompiler.Lambda.cs
- CodeComment.cs
- CapabilitiesAssignment.cs
- XPathSelectionIterator.cs
- RewritingPass.cs
- DataGridTextBox.cs
- AutomationElement.cs
- MatrixTransform3D.cs
- LiteralLink.cs
- IdentityReference.cs
- DbProviderServices.cs
- ExportOptions.cs
- TextReturnReader.cs
- XmlSchemaSimpleTypeList.cs
- TypeUnloadedException.cs
- sqlpipe.cs
- DoubleAnimationUsingKeyFrames.cs
- CompilerCollection.cs
- ChannelManager.cs
- SoapUnknownHeader.cs
- StaticResourceExtension.cs
- HashLookup.cs
- _SslSessionsCache.cs
- VisualStyleElement.cs
- DbProviderConfigurationHandler.cs
- TextRunProperties.cs
- FillBehavior.cs
- base64Transforms.cs
- SettingsSection.cs
- PointHitTestParameters.cs
- ProcessHost.cs
- SqlComparer.cs
- BitmapScalingModeValidation.cs
- SamlAssertionKeyIdentifierClause.cs
- AttributeEmitter.cs
- EventDescriptor.cs
- HopperCache.cs
- SqlAggregateChecker.cs
- HtmlControl.cs
- StyleModeStack.cs
- AssemblyLoader.cs
- PreservationFileWriter.cs
- FillRuleValidation.cs
- FormsAuthenticationModule.cs
- DesignColumn.cs
- ChtmlFormAdapter.cs
- AssemblySettingAttributes.cs
- ResolveNameEventArgs.cs
- MergeExecutor.cs
- CalendarTable.cs
- StretchValidation.cs
- DisplayMemberTemplateSelector.cs
- XmlTextReaderImpl.cs
- XmlEventCache.cs
- Pkcs7Signer.cs
- IndexedGlyphRun.cs
- XmlQualifiedNameTest.cs