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
- CombinedTcpChannel.cs
- DNS.cs
- TreeViewItemAutomationPeer.cs
- util.cs
- RegistrationServices.cs
- ResourceDictionary.cs
- VScrollBar.cs
- EventProperty.cs
- FaultHandlingFilter.cs
- IISUnsafeMethods.cs
- PageThemeParser.cs
- SqlCommandSet.cs
- CodeDOMProvider.cs
- coordinatorfactory.cs
- OdbcConnectionStringbuilder.cs
- ApplicationTrust.cs
- xsdvalidator.cs
- SettingsSection.cs
- FrameworkElement.cs
- TraceShell.cs
- Oid.cs
- NetworkCredential.cs
- StrokeNodeEnumerator.cs
- DataGridViewRowHeaderCell.cs
- WebEventTraceProvider.cs
- UriTemplateClientFormatter.cs
- DataGridDetailsPresenterAutomationPeer.cs
- SqlInternalConnectionTds.cs
- ChangePassword.cs
- ClientSection.cs
- SmiContextFactory.cs
- Registration.cs
- OlePropertyStructs.cs
- Internal.cs
- DataGridPagerStyle.cs
- ResourceAttributes.cs
- RMEnrollmentPage3.cs
- XslVisitor.cs
- HeaderCollection.cs
- DurableInstancingOptions.cs
- XMLDiffLoader.cs
- BindingListCollectionView.cs
- XmlSchemaInfo.cs
- RtType.cs
- XmlTypeMapping.cs
- WindowsComboBox.cs
- DataGridTextBox.cs
- SingleStorage.cs
- SerialReceived.cs
- InlinedAggregationOperatorEnumerator.cs
- _AutoWebProxyScriptEngine.cs
- FunctionQuery.cs
- ExpressionEditorAttribute.cs
- FontStretch.cs
- BindingContext.cs
- CapacityStreamGeometryContext.cs
- Blend.cs
- log.cs
- PrintController.cs
- Module.cs
- TemplateBamlRecordReader.cs
- SqlExpander.cs
- LambdaCompiler.Unary.cs
- Activation.cs
- FlowchartDesignerCommands.cs
- ConfigurationSettings.cs
- ToolboxComponentsCreatedEventArgs.cs
- LogicalTreeHelper.cs
- TextDecorationCollection.cs
- ReaderWriterLockSlim.cs
- XmlSchemaAppInfo.cs
- MinMaxParagraphWidth.cs
- AspCompat.cs
- IncrementalCompileAnalyzer.cs
- AuthenticationModuleElementCollection.cs
- TextPointer.cs
- DataSetSchema.cs
- DataFieldConverter.cs
- BulletedList.cs
- Opcode.cs
- RewritingPass.cs
- ToolBarTray.cs
- BindToObject.cs
- HealthMonitoringSection.cs
- SettingsContext.cs
- AuthenticationException.cs
- CryptoHandle.cs
- DebugView.cs
- DataSourceCacheDurationConverter.cs
- DynamicResourceExtensionConverter.cs
- MenuEventArgs.cs
- DataGridPageChangedEventArgs.cs
- CompositionAdorner.cs
- Wow64ConfigurationLoader.cs
- _ProxyRegBlob.cs
- ScriptComponentDescriptor.cs
- PhysicalAddress.cs
- SQLBytesStorage.cs
- GeneralEndpointIdentity.cs
- HealthMonitoringSectionHelper.cs