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
- StorageConditionPropertyMapping.cs
- RSACryptoServiceProvider.cs
- XmlDataSource.cs
- RecordBuilder.cs
- SimpleHandlerBuildProvider.cs
- ButtonField.cs
- EventWaitHandle.cs
- documentsequencetextpointer.cs
- SerializationObjectManager.cs
- TCEAdapterGenerator.cs
- EncoderParameters.cs
- SubMenuStyleCollection.cs
- SQLConvert.cs
- Vector3DKeyFrameCollection.cs
- CroppedBitmap.cs
- HtmlInputHidden.cs
- ADMembershipProvider.cs
- FileDetails.cs
- ConnectionInterfaceCollection.cs
- SiteMapNodeCollection.cs
- TypeSystemProvider.cs
- ListManagerBindingsCollection.cs
- ObjRef.cs
- JoinQueryOperator.cs
- FamilyCollection.cs
- JavaScriptSerializer.cs
- LoginCancelEventArgs.cs
- X509Certificate2Collection.cs
- OrderingQueryOperator.cs
- DataGridRowHeader.cs
- TableLayoutPanelCellPosition.cs
- IncomingWebRequestContext.cs
- DataGridTemplateColumn.cs
- MsmqInputChannel.cs
- CommandCollectionEditor.cs
- NativeMethods.cs
- XPathNodePointer.cs
- TypeHelper.cs
- CssTextWriter.cs
- BinaryConverter.cs
- HtmlTableCellCollection.cs
- WindowInteractionStateTracker.cs
- DataGridViewRowsAddedEventArgs.cs
- ProcessHostConfigUtils.cs
- SqlBulkCopy.cs
- ServerValidateEventArgs.cs
- ReadOnlyHierarchicalDataSource.cs
- TagPrefixCollection.cs
- EdmToObjectNamespaceMap.cs
- WebControlsSection.cs
- HtmlInputReset.cs
- ControlValuePropertyAttribute.cs
- InnerItemCollectionView.cs
- ConvertEvent.cs
- MenuBase.cs
- ExtentKey.cs
- XmlQueryStaticData.cs
- SerializerWriterEventHandlers.cs
- PairComparer.cs
- SqlDataSourceFilteringEventArgs.cs
- MsmqInputSessionChannelListener.cs
- DtdParser.cs
- Delay.cs
- PermissionRequestEvidence.cs
- OdbcCommandBuilder.cs
- TcpSocketManager.cs
- EdmItemError.cs
- CodeGroup.cs
- LassoSelectionBehavior.cs
- ProfileEventArgs.cs
- TraceXPathNavigator.cs
- AddInPipelineAttributes.cs
- SByteStorage.cs
- RandomDelaySendsAsyncResult.cs
- UIntPtr.cs
- ExecutionEngineException.cs
- StylusEventArgs.cs
- MimeObjectFactory.cs
- FamilyTypefaceCollection.cs
- CodeGenerator.cs
- DataControlLinkButton.cs
- FuncCompletionCallbackWrapper.cs
- PropertyCondition.cs
- UnsignedPublishLicense.cs
- ThemeInfoAttribute.cs
- TextBox.cs
- DataServiceRequest.cs
- Timer.cs
- ExtentKey.cs
- TypedRowGenerator.cs
- DocumentXmlWriter.cs
- SerializationAttributes.cs
- TemplateParser.cs
- ObjectSpanRewriter.cs
- Interfaces.cs
- EntityDataSourceMemberPath.cs
- PowerStatus.cs
- SendSecurityHeaderElement.cs
- Aes.cs
- ImportCatalogPart.cs