Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / RefType.cs / 3 / 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
- Crypto.cs
- Registry.cs
- ImpersonateTokenRef.cs
- OdbcReferenceCollection.cs
- CommandConverter.cs
- DrawToolTipEventArgs.cs
- Script.cs
- SettingsContext.cs
- HTMLTagNameToTypeMapper.cs
- AudioSignalProblemOccurredEventArgs.cs
- PasswordTextNavigator.cs
- UnsafeNativeMethods.cs
- RSAOAEPKeyExchangeDeformatter.cs
- HyperLinkStyle.cs
- FaultDesigner.cs
- SoapAttributeOverrides.cs
- ObjectItemCollection.cs
- OptimisticConcurrencyException.cs
- CorruptingExceptionCommon.cs
- GridView.cs
- UntypedNullExpression.cs
- ObjectManager.cs
- ProviderSettings.cs
- DocumentXmlWriter.cs
- XamlToRtfParser.cs
- AutomationPropertyInfo.cs
- SQLString.cs
- VisualTreeUtils.cs
- SqlRowUpdatedEvent.cs
- TableLayoutStyleCollection.cs
- ImageButton.cs
- SoundPlayerAction.cs
- SchemaCollectionCompiler.cs
- ImportContext.cs
- BindingCollection.cs
- Normalization.cs
- AuthenticationModuleElementCollection.cs
- MorphHelper.cs
- NaturalLanguageHyphenator.cs
- UnmanagedMemoryStreamWrapper.cs
- QuaternionValueSerializer.cs
- WebPartZone.cs
- entityreference_tresulttype.cs
- LicenseContext.cs
- Vector3D.cs
- RequestQueue.cs
- WebServiceData.cs
- ValidatorCompatibilityHelper.cs
- DataGridViewControlCollection.cs
- _FtpControlStream.cs
- SystemIcons.cs
- InstanceNameConverter.cs
- StateManagedCollection.cs
- StrokeNodeData.cs
- HandleCollector.cs
- CapabilitiesState.cs
- Barrier.cs
- Registry.cs
- DataPagerFieldItem.cs
- AQNBuilder.cs
- AuthenticationSchemesHelper.cs
- VisemeEventArgs.cs
- PagePropertiesChangingEventArgs.cs
- StructuralType.cs
- LinearKeyFrames.cs
- Span.cs
- PersonalizationState.cs
- VoiceSynthesis.cs
- PerformanceCounterCategory.cs
- wgx_commands.cs
- BCLDebug.cs
- PrePrepareMethodAttribute.cs
- OdbcException.cs
- XpsColorContext.cs
- LinqDataSourceContextData.cs
- ContextMarshalException.cs
- ElementHost.cs
- PaintEvent.cs
- _DomainName.cs
- AppSecurityManager.cs
- CollectionEditorDialog.cs
- ContentDisposition.cs
- QuadraticBezierSegment.cs
- Attributes.cs
- ObjectRef.cs
- RNGCryptoServiceProvider.cs
- DynamicPropertyReader.cs
- EntityProviderServices.cs
- AmbientLight.cs
- WindowsGraphics.cs
- TextEditorTyping.cs
- HtmlProps.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- WebConfigurationManager.cs
- TextRangeEditLists.cs
- PermissionAttributes.cs
- ContextMenu.cs
- RelativeSource.cs
- DbProviderManifest.cs
- IndependentAnimationStorage.cs