Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / RefType.cs / 1 / 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
- ButtonBaseAdapter.cs
- AssemblySettingAttributes.cs
- CompiledQuery.cs
- Rule.cs
- View.cs
- XNameConverter.cs
- BamlTreeNode.cs
- SizeIndependentAnimationStorage.cs
- WebPartVerbCollection.cs
- NamespaceTable.cs
- ButtonFlatAdapter.cs
- FixedSOMGroup.cs
- NoPersistProperty.cs
- TextBoxLine.cs
- XhtmlBasicTextBoxAdapter.cs
- PerformanceCounterPermissionEntry.cs
- TextRunCacheImp.cs
- DefinitionBase.cs
- WmlTextViewAdapter.cs
- MenuItemBinding.cs
- controlskin.cs
- CompilationLock.cs
- ImageFormatConverter.cs
- RtfToXamlReader.cs
- LiteralControl.cs
- EntityProxyFactory.cs
- XappLauncher.cs
- Config.cs
- LoadItemsEventArgs.cs
- SqlCacheDependencyDatabaseCollection.cs
- SerializationSectionGroup.cs
- MarshalByRefObject.cs
- MenuItem.cs
- IndentTextWriter.cs
- WebPartCatalogCloseVerb.cs
- WindowsBrush.cs
- SafeLibraryHandle.cs
- BrushValueSerializer.cs
- PropertyEmitterBase.cs
- TreeViewItemAutomationPeer.cs
- MimeXmlReflector.cs
- BindingContext.cs
- DataTableMappingCollection.cs
- XPathCompiler.cs
- IxmlLineInfo.cs
- DesignerActionTextItem.cs
- wgx_sdk_version.cs
- LiteralText.cs
- SmtpReplyReader.cs
- EditorZoneDesigner.cs
- DesignerAdapterUtil.cs
- ValueUtilsSmi.cs
- ParserOptions.cs
- TypeSystemHelpers.cs
- OrderedDictionary.cs
- MenuCommand.cs
- WebPartVerb.cs
- CharAnimationUsingKeyFrames.cs
- SectionRecord.cs
- SymLanguageType.cs
- DataGridCellsPresenter.cs
- SqlDelegatedTransaction.cs
- WebBrowser.cs
- Int64AnimationBase.cs
- OdbcConnectionStringbuilder.cs
- RemoteHelper.cs
- ListViewItem.cs
- DbParameterCollection.cs
- DispatcherFrame.cs
- SyndicationElementExtensionCollection.cs
- XmlCountingReader.cs
- DetailsViewCommandEventArgs.cs
- FactoryMaker.cs
- TableLayoutStyle.cs
- ConstantSlot.cs
- XmlElementList.cs
- TextBoxBase.cs
- MembershipValidatePasswordEventArgs.cs
- Assembly.cs
- HttpChannelBindingToken.cs
- EventLogReader.cs
- Baml2006KeyRecord.cs
- CompileXomlTask.cs
- Configuration.cs
- Rectangle.cs
- BamlWriter.cs
- ExceptionNotification.cs
- DtrList.cs
- ConnectionPointConverter.cs
- BevelBitmapEffect.cs
- QueryContinueDragEventArgs.cs
- MembershipAdapter.cs
- DateTimeStorage.cs
- ContainerControl.cs
- SingleTagSectionHandler.cs
- PageCatalogPart.cs
- ConditionalBranch.cs
- TreeNodeClickEventArgs.cs
- ObjRef.cs
- SQLCharsStorage.cs