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
- ListViewUpdateEventArgs.cs
- SingleResultAttribute.cs
- PopupControlService.cs
- Int64Animation.cs
- SqlMethodTransformer.cs
- _DigestClient.cs
- FloaterBaseParagraph.cs
- StreamReader.cs
- IDispatchConstantAttribute.cs
- PeerInvitationResponse.cs
- ManagementPath.cs
- WebPartZoneCollection.cs
- ValidationVisibilityAttribute.cs
- HandlerElementCollection.cs
- Rfc2898DeriveBytes.cs
- IncrementalCompileAnalyzer.cs
- SqlCommandSet.cs
- SmtpReplyReaderFactory.cs
- UserPreferenceChangingEventArgs.cs
- SortKey.cs
- GridView.cs
- DictionaryChange.cs
- ViewDesigner.cs
- _CacheStreams.cs
- ConfigXmlSignificantWhitespace.cs
- Trace.cs
- ToolStripContentPanelRenderEventArgs.cs
- KeyValueConfigurationElement.cs
- BitConverter.cs
- X509UI.cs
- IntSecurity.cs
- SocketException.cs
- BitmapImage.cs
- DesignerCalendarAdapter.cs
- ObjectDataSourceMethodEditor.cs
- BitmapSourceSafeMILHandle.cs
- PhoneCallDesigner.cs
- ExpressionVisitor.cs
- HttpListenerResponse.cs
- FixedSOMTable.cs
- Brush.cs
- MarkupProperty.cs
- PackageRelationshipCollection.cs
- ValidationUtility.cs
- HTMLTagNameToTypeMapper.cs
- SchemaImporterExtensionsSection.cs
- Native.cs
- EditorPartChrome.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- FixedPage.cs
- StaticContext.cs
- ToolStripProgressBar.cs
- WrapPanel.cs
- Screen.cs
- MetadataSource.cs
- Constants.cs
- Pair.cs
- OutOfProcStateClientManager.cs
- NativeMethods.cs
- StreamGeometry.cs
- xmlglyphRunInfo.cs
- RectAnimationClockResource.cs
- CloudCollection.cs
- RotateTransform3D.cs
- AutoResizedEvent.cs
- ComboBoxRenderer.cs
- SiteMapNodeCollection.cs
- WindowsPrincipal.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- SafeCertificateStore.cs
- EmbeddedMailObjectCollectionEditor.cs
- DefaultSerializationProviderAttribute.cs
- TypeConstant.cs
- SHA1.cs
- SqlWebEventProvider.cs
- SingleAnimationBase.cs
- DefaultPrintController.cs
- PrintDialogException.cs
- CultureInfo.cs
- Serializer.cs
- FixedPage.cs
- GroupBoxAutomationPeer.cs
- NavigationHelper.cs
- TdsParameterSetter.cs
- _SslSessionsCache.cs
- WriteTimeStream.cs
- InstanceDataCollectionCollection.cs
- PassportAuthenticationModule.cs
- NameValueFileSectionHandler.cs
- SpecialFolderEnumConverter.cs
- TypeToArgumentTypeConverter.cs
- OleDbException.cs
- NameValuePermission.cs
- HttpProfileGroupBase.cs
- ScriptingSectionGroup.cs
- FullTextState.cs
- XhtmlConformanceSection.cs
- DataServiceBuildProvider.cs
- AmbientValueAttribute.cs
- webeventbuffer.cs