Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / RefType.cs / 2 / RefType.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....], [....]
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Text;
namespace System.Data.Metadata.Edm
{
///
/// Class representing a ref type
///
public sealed class RefType : EdmType
{
#region Constructors
///
/// The constructor for constructing a RefType object with the entity type it references
///
/// The entity type that this ref type references
/// Thrown if entityType argument is null
internal RefType(EntityType entityType)
: base(GetIdentity(EntityUtil.GenericCheckArgumentNull(entityType, "entityType")),
EdmConstants.TransientNamespace, entityType.DataSpace)
{
_elementType = entityType;
SetReadOnly();
}
#endregion
#region Fields
private readonly EntityTypeBase _elementType;
#endregion
#region Properties
///
/// Returns the kind of the type
///
public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.RefType; } }
///
/// The entity type that this ref type references
///
[MetadataProperty(BuiltInTypeKind.EntityTypeBase, false)]
public EntityTypeBase ElementType
{
get
{
return _elementType;
}
}
#endregion
#region Methods
///
/// Constructs the name of the collection type
///
/// The entity type base that this ref type refers to
/// The identity of the resulting ref type
private static string GetIdentity(EntityTypeBase entityTypeBase)
{
StringBuilder builder = new StringBuilder(50);
builder.Append("reference[");
entityTypeBase.BuildIdentity(builder);
builder.Append("]");
return builder.ToString();
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....], [....]
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Text;
namespace System.Data.Metadata.Edm
{
///
/// Class representing a ref type
///
public sealed class RefType : EdmType
{
#region Constructors
///
/// The constructor for constructing a RefType object with the entity type it references
///
/// The entity type that this ref type references
/// Thrown if entityType argument is null
internal RefType(EntityType entityType)
: base(GetIdentity(EntityUtil.GenericCheckArgumentNull(entityType, "entityType")),
EdmConstants.TransientNamespace, entityType.DataSpace)
{
_elementType = entityType;
SetReadOnly();
}
#endregion
#region Fields
private readonly EntityTypeBase _elementType;
#endregion
#region Properties
///
/// Returns the kind of the type
///
public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.RefType; } }
///
/// The entity type that this ref type references
///
[MetadataProperty(BuiltInTypeKind.EntityTypeBase, false)]
public EntityTypeBase ElementType
{
get
{
return _elementType;
}
}
#endregion
#region Methods
///
/// Constructs the name of the collection type
///
/// The entity type base that this ref type refers to
/// The identity of the resulting ref type
private static string GetIdentity(EntityTypeBase entityTypeBase)
{
StringBuilder builder = new StringBuilder(50);
builder.Append("reference[");
entityTypeBase.BuildIdentity(builder);
builder.Append("]");
return builder.ToString();
}
#endregion
}
}
// 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
- SqlDataSourceEnumerator.cs
- SettingsBindableAttribute.cs
- PathGeometry.cs
- HtmlInputControl.cs
- ClientScriptManager.cs
- CodeGenerator.cs
- UnsafeNativeMethods.cs
- ProgressBar.cs
- ImageSource.cs
- TransactionManager.cs
- SettingsSavedEventArgs.cs
- UnsafeNativeMethods.cs
- SQLBytesStorage.cs
- CodeTypeParameter.cs
- TagMapInfo.cs
- ExceptionAggregator.cs
- HttpAsyncResult.cs
- DrawingBrush.cs
- RankException.cs
- BulletChrome.cs
- InvalidAsynchronousStateException.cs
- ProcessingInstructionAction.cs
- Byte.cs
- CommonGetThemePartSize.cs
- ParallelActivityDesigner.cs
- SymmetricAlgorithm.cs
- Style.cs
- SchemaLookupTable.cs
- PrefixQName.cs
- GatewayIPAddressInformationCollection.cs
- ControlValuePropertyAttribute.cs
- AliasExpr.cs
- HMACMD5.cs
- InstanceDataCollection.cs
- ResponseStream.cs
- SafeArrayTypeMismatchException.cs
- CallId.cs
- HistoryEventArgs.cs
- DesignRelation.cs
- FigureHelper.cs
- IfAction.cs
- HttpModulesSection.cs
- UInt64Storage.cs
- HttpServerUtilityBase.cs
- Part.cs
- ReadOnlyPropertyMetadata.cs
- StylusCaptureWithinProperty.cs
- WebResponse.cs
- FieldToken.cs
- InkPresenter.cs
- XmlTextWriter.cs
- Convert.cs
- Wrapper.cs
- MergeFailedEvent.cs
- CalendarDesigner.cs
- FormattedTextSymbols.cs
- WindowHideOrCloseTracker.cs
- ThreadExceptionDialog.cs
- SpecialNameAttribute.cs
- GPPOINTF.cs
- LayoutDump.cs
- MessagingActivityHelper.cs
- ModuleBuilder.cs
- Bold.cs
- SequenceFullException.cs
- MinimizableAttributeTypeConverter.cs
- AnnotationAdorner.cs
- CalendarDataBindingHandler.cs
- TypeResolver.cs
- InstalledVoice.cs
- BrowserCapabilitiesCodeGenerator.cs
- DependentList.cs
- LifetimeServices.cs
- EmbossBitmapEffect.cs
- HMACSHA512.cs
- SqlUnionizer.cs
- PackageProperties.cs
- ScriptingSectionGroup.cs
- BaseValidator.cs
- SequenceDesigner.cs
- DataGridColumnHeaderCollection.cs
- IpcManager.cs
- AggregateNode.cs
- Method.cs
- ProviderSettingsCollection.cs
- ConstructorBuilder.cs
- ToolStripPanelDesigner.cs
- ExpressionPrefixAttribute.cs
- IfJoinedCondition.cs
- PathStreamGeometryContext.cs
- RemotingSurrogateSelector.cs
- HttpRequestBase.cs
- DataServiceExpressionVisitor.cs
- RequestContextBase.cs
- SoapServerProtocol.cs
- JournalEntryListConverter.cs
- CompositeActivityDesigner.cs
- WebResponse.cs
- DataService.cs
- StructuredTypeEmitter.cs