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
- ActivityCollectionMarkupSerializer.cs
- ScaleTransform.cs
- GraphicsState.cs
- PriorityChain.cs
- XmlWriterDelegator.cs
- PnrpPermission.cs
- HttpCachePolicyElement.cs
- DynamicExpression.cs
- Popup.cs
- ToolStripOverflow.cs
- KnownBoxes.cs
- DomainUpDown.cs
- MetaType.cs
- XmlQueryOutput.cs
- PreviewKeyDownEventArgs.cs
- CounterSetInstanceCounterDataSet.cs
- SettingsPropertyCollection.cs
- PointLight.cs
- ListBase.cs
- Listbox.cs
- CheckPair.cs
- XPathException.cs
- MessageSecurityTokenVersion.cs
- SqlConnectionHelper.cs
- Assign.cs
- SessionEndedEventArgs.cs
- ReferenceEqualityComparer.cs
- FreezableCollection.cs
- transactioncontext.cs
- WebColorConverter.cs
- ActivityDesignerHelper.cs
- Encoder.cs
- ElementHost.cs
- MethodBody.cs
- RuleAttributes.cs
- DataServiceHost.cs
- ToolStripGripRenderEventArgs.cs
- OutOfProcStateClientManager.cs
- WindowsGrip.cs
- TrailingSpaceComparer.cs
- MdiWindowListStrip.cs
- MarkupExtensionSerializer.cs
- DrawingContextWalker.cs
- HttpModuleAction.cs
- ResourceDescriptionAttribute.cs
- DataGridViewCellLinkedList.cs
- XmlSchemaAnyAttribute.cs
- ExpressionHelper.cs
- DynamicResourceExtensionConverter.cs
- DbMetaDataCollectionNames.cs
- XsdDuration.cs
- RunWorkerCompletedEventArgs.cs
- __TransparentProxy.cs
- BooleanSwitch.cs
- DataGridViewAccessibleObject.cs
- WindowsRegion.cs
- HttpModuleCollection.cs
- SqlDataSourceStatusEventArgs.cs
- ForwardPositionQuery.cs
- AspProxy.cs
- AnnotationMap.cs
- MaskedTextBoxDesigner.cs
- Tracer.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- MemberInfoSerializationHolder.cs
- ProcessModelInfo.cs
- FixedSOMTable.cs
- TransformDescriptor.cs
- ImageBrush.cs
- PublishLicense.cs
- Permission.cs
- CustomAttribute.cs
- CompareValidator.cs
- SmtpLoginAuthenticationModule.cs
- NavigationProgressEventArgs.cs
- ObservableDictionary.cs
- DataGridSortCommandEventArgs.cs
- SafeEventHandle.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- AssemblyBuilderData.cs
- FixedPageProcessor.cs
- _NetRes.cs
- SafeCryptoHandles.cs
- ParseElement.cs
- Utils.cs
- OracleDataAdapter.cs
- SingleConverter.cs
- DoubleLinkListEnumerator.cs
- DbDeleteCommandTree.cs
- XmlSchemaGroup.cs
- FixedLineResult.cs
- XPathParser.cs
- EmptyEnumerator.cs
- LayoutDump.cs
- RenderDataDrawingContext.cs
- RuntimeConfigurationRecord.cs
- BaseParagraph.cs
- CommonRemoteMemoryBlock.cs
- ApplicationSecurityManager.cs
- ContainerTracking.cs