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
- BaseDataList.cs
- ToolBarButton.cs
- QilTargetType.cs
- RSAProtectedConfigurationProvider.cs
- CodePropertyReferenceExpression.cs
- ScriptMethodAttribute.cs
- HMACSHA1.cs
- FilePrompt.cs
- MediaSystem.cs
- InvalidCastException.cs
- HtmlInputRadioButton.cs
- PropertyGridEditorPart.cs
- NativeMethods.cs
- ProfileInfo.cs
- SafeHandles.cs
- ContentFilePart.cs
- XamlSerializationHelper.cs
- TablePatternIdentifiers.cs
- MinimizableAttributeTypeConverter.cs
- CapacityStreamGeometryContext.cs
- ProfileManager.cs
- PageContent.cs
- ModuleElement.cs
- RuntimeArgumentHandle.cs
- ToolBarButton.cs
- HttpResponseHeader.cs
- ElementHostAutomationPeer.cs
- UserUseLicenseDictionaryLoader.cs
- SqlDataRecord.cs
- TabletDeviceInfo.cs
- OdbcConnectionPoolProviderInfo.cs
- DateTimeConstantAttribute.cs
- TimeSpanStorage.cs
- PageParser.cs
- DataGridViewElement.cs
- KeyPressEvent.cs
- MaskedTextBox.cs
- FrameAutomationPeer.cs
- ScriptReference.cs
- SafeSecurityHelper.cs
- System.Data_BID.cs
- PermissionSetTriple.cs
- Subset.cs
- GlobalProxySelection.cs
- Attributes.cs
- PointAnimationUsingKeyFrames.cs
- AttributeProviderAttribute.cs
- TextEmbeddedObject.cs
- FixedSOMFixedBlock.cs
- DataSetUtil.cs
- SocketInformation.cs
- TextRangeEditTables.cs
- SqlVisitor.cs
- _AcceptOverlappedAsyncResult.cs
- MembershipUser.cs
- SqlStream.cs
- ExtensionElement.cs
- XmlSchemaSimpleTypeRestriction.cs
- BindableAttribute.cs
- DataServiceException.cs
- XmlSerializerOperationBehavior.cs
- SocketInformation.cs
- GridItemCollection.cs
- DataGridRow.cs
- SecurityPolicySection.cs
- Attribute.cs
- TrustManagerMoreInformation.cs
- IgnoreSectionHandler.cs
- DataPagerFieldCommandEventArgs.cs
- DataSourceControlBuilder.cs
- ModuleBuilder.cs
- ContourSegment.cs
- RSAOAEPKeyExchangeFormatter.cs
- ObjectRef.cs
- MembershipValidatePasswordEventArgs.cs
- ColorMap.cs
- ResXResourceWriter.cs
- Viewport3DVisual.cs
- WebPartConnectionsCancelVerb.cs
- ColorAnimationUsingKeyFrames.cs
- RelationHandler.cs
- QilScopedVisitor.cs
- ListControl.cs
- XsltException.cs
- ModifiableIteratorCollection.cs
- CodeMemberMethod.cs
- StandardOleMarshalObject.cs
- ParameterModifier.cs
- MessagePropertyVariants.cs
- WeakKeyDictionary.cs
- FormConverter.cs
- ConsumerConnectionPointCollection.cs
- TextCollapsingProperties.cs
- ClrPerspective.cs
- UnmanagedBitmapWrapper.cs
- RequestCache.cs
- CodeSubDirectoriesCollection.cs
- HandleRef.cs
- ReachDocumentReferenceSerializer.cs
- ConfigXmlCDataSection.cs