Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDataSourceEntityTypeFilterItem.cs / 3 / EntityDataSourceEntityTypeFilterItem.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//-----------------------------------------------------------------------------
using System.Data.Metadata.Edm;
namespace System.Web.UI.Design.WebControls
{
internal class EntityDataSourceEntityTypeFilterItem : IComparable
{
// Only one of the following should be set. This is enforced through the constructors and the fact that these fields are readonly.
private readonly EntityType _entityType; // used when we have a real EntityType backing this item
private readonly string _unknownEntityTypeName; // used when we have an unknown EntityTypeFilter that we still want to include in the list
internal EntityDataSourceEntityTypeFilterItem(EntityType entityType)
{
_entityType = entityType;
}
internal EntityDataSourceEntityTypeFilterItem(string unknownEntityTypeName)
{
_unknownEntityTypeName = unknownEntityTypeName;
}
internal string EntityTypeName
{
get
{
if (_entityType != null)
{
return _entityType.Name;
}
else
{
return _unknownEntityTypeName;
}
}
}
internal EntityType EntityType
{
get
{
return _entityType;
}
}
public override string ToString()
{
return EntityTypeName;
}
int IComparable.CompareTo(EntityDataSourceEntityTypeFilterItem other)
{
return (String.Compare(this.EntityTypeName, other.EntityTypeName, StringComparison.OrdinalIgnoreCase));
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//-----------------------------------------------------------------------------
using System.Data.Metadata.Edm;
namespace System.Web.UI.Design.WebControls
{
internal class EntityDataSourceEntityTypeFilterItem : IComparable
{
// Only one of the following should be set. This is enforced through the constructors and the fact that these fields are readonly.
private readonly EntityType _entityType; // used when we have a real EntityType backing this item
private readonly string _unknownEntityTypeName; // used when we have an unknown EntityTypeFilter that we still want to include in the list
internal EntityDataSourceEntityTypeFilterItem(EntityType entityType)
{
_entityType = entityType;
}
internal EntityDataSourceEntityTypeFilterItem(string unknownEntityTypeName)
{
_unknownEntityTypeName = unknownEntityTypeName;
}
internal string EntityTypeName
{
get
{
if (_entityType != null)
{
return _entityType.Name;
}
else
{
return _unknownEntityTypeName;
}
}
}
internal EntityType EntityType
{
get
{
return _entityType;
}
}
public override string ToString()
{
return EntityTypeName;
}
int IComparable.CompareTo(EntityDataSourceEntityTypeFilterItem other)
{
return (String.Compare(this.EntityTypeName, other.EntityTypeName, StringComparison.OrdinalIgnoreCase));
}
}
}
// 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
- Scanner.cs
- TimeSpanStorage.cs
- DataGridViewCellPaintingEventArgs.cs
- BypassElement.cs
- Trace.cs
- AuthorizationSection.cs
- CodeTypeOfExpression.cs
- BitStack.cs
- StringDictionary.cs
- WebPartMovingEventArgs.cs
- BlurEffect.cs
- grammarelement.cs
- XsdBuildProvider.cs
- BindingManagerDataErrorEventArgs.cs
- ClientSponsor.cs
- InnerItemCollectionView.cs
- RuleRef.cs
- PictureBox.cs
- DataGridViewCellFormattingEventArgs.cs
- ObjectStorage.cs
- GenericIdentity.cs
- RequestCacheEntry.cs
- MsmqOutputChannel.cs
- Transform3D.cs
- EntityContainerEntitySetDefiningQuery.cs
- GridViewPageEventArgs.cs
- _ContextAwareResult.cs
- TdsParserStateObject.cs
- ToolStripDropTargetManager.cs
- PageDeviceFont.cs
- DataGridViewColumnConverter.cs
- ContactManager.cs
- ObjectListCommandEventArgs.cs
- ConfigurationException.cs
- NeutralResourcesLanguageAttribute.cs
- TypeConverterHelper.cs
- HwndKeyboardInputProvider.cs
- Utils.cs
- XappLauncher.cs
- PerformanceCounter.cs
- SplitterPanel.cs
- SpecialTypeDataContract.cs
- WebPartPersonalization.cs
- IIS7UserPrincipal.cs
- FlowDocumentFormatter.cs
- DataControlHelper.cs
- TypeAccessException.cs
- PngBitmapDecoder.cs
- FontStretch.cs
- EdmItemError.cs
- ArrayEditor.cs
- MsmqActivation.cs
- AssociationSet.cs
- UserControlBuildProvider.cs
- Helpers.cs
- FactoryId.cs
- URL.cs
- ValuePattern.cs
- NamedPipeTransportSecurityElement.cs
- ConfigDefinitionUpdates.cs
- SplitterPanel.cs
- CustomAttributeBuilder.cs
- TextAnchor.cs
- EventArgs.cs
- TemplateLookupAction.cs
- IsolatedStorageException.cs
- FontUnit.cs
- EntityModelBuildProvider.cs
- XmlFormatMapping.cs
- Timer.cs
- EDesignUtil.cs
- StrokeNodeData.cs
- SqlGatherProducedAliases.cs
- ScrollChangedEventArgs.cs
- QilStrConcatenator.cs
- PenContexts.cs
- AttachmentCollection.cs
- ComplexPropertyEntry.cs
- TreeNode.cs
- CharConverter.cs
- BitmapScalingModeValidation.cs
- CorruptingExceptionCommon.cs
- CompilationRelaxations.cs
- LayoutUtils.cs
- URIFormatException.cs
- SourceInterpreter.cs
- BridgeDataRecord.cs
- Freezable.cs
- ImageCodecInfoPrivate.cs
- SoapTypeAttribute.cs
- XmlUtil.cs
- BufferModeSettings.cs
- ECDsa.cs
- TdsParserSafeHandles.cs
- CodeDOMProvider.cs
- SchemaCollectionPreprocessor.cs
- WindowsFormsLinkLabel.cs
- RuntimeHandles.cs
- ManagedIStream.cs
- objectresult_tresulttype.cs