Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / RefType.cs / 1305376 / RefType.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- 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 [....] // @backupOwner [....] //--------------------------------------------------------------------- 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
- DataBindingExpressionBuilder.cs
- GridProviderWrapper.cs
- Atom10FeedFormatter.cs
- FaultHandlingFilter.cs
- SqlBulkCopyColumnMappingCollection.cs
- DesignerValidationSummaryAdapter.cs
- SystemIPGlobalStatistics.cs
- TdsParserHelperClasses.cs
- SaveFileDialog.cs
- DbProviderConfigurationHandler.cs
- ProgressBarHighlightConverter.cs
- webproxy.cs
- EmbeddedMailObject.cs
- MouseCaptureWithinProperty.cs
- OracleSqlParser.cs
- BaseCollection.cs
- DecoderReplacementFallback.cs
- FaultReasonText.cs
- BrowserCapabilitiesFactoryBase.cs
- DNS.cs
- IBuiltInEvidence.cs
- CodeDirectiveCollection.cs
- DataGridViewTextBoxColumn.cs
- BoundingRectTracker.cs
- Environment.cs
- PlanCompilerUtil.cs
- NativeCppClassAttribute.cs
- SafeEventLogReadHandle.cs
- XslCompiledTransform.cs
- FixedDocumentSequencePaginator.cs
- DnsEndPoint.cs
- EditorBrowsableAttribute.cs
- TargetFrameworkUtil.cs
- Font.cs
- NegatedCellConstant.cs
- XmlNamespaceManager.cs
- DropShadowBitmapEffect.cs
- DataServiceClientException.cs
- ObjectPersistData.cs
- UnsafeNativeMethods.cs
- HttpListenerPrefixCollection.cs
- TextElementCollectionHelper.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- LinkClickEvent.cs
- VideoDrawing.cs
- ChildDocumentBlock.cs
- XmlSchemaCollection.cs
- TextElement.cs
- TimerTable.cs
- SelectionItemProviderWrapper.cs
- JoinTreeNode.cs
- ListViewSortEventArgs.cs
- XmlSchemaSet.cs
- MetadataUtilsSmi.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- UiaCoreProviderApi.cs
- MultiTrigger.cs
- HttpHandlersSection.cs
- CollectionViewGroup.cs
- ManagementPath.cs
- DynamicRendererThreadManager.cs
- StylusShape.cs
- ClientFormsIdentity.cs
- WmfPlaceableFileHeader.cs
- HebrewCalendar.cs
- EditorZone.cs
- BinaryEditor.cs
- DateTimeUtil.cs
- OletxResourceManager.cs
- TaskDesigner.cs
- mediaclock.cs
- DataSourceDesigner.cs
- PersonalizationStateQuery.cs
- DiscoveryDefaults.cs
- HtmlEncodedRawTextWriter.cs
- NameSpaceEvent.cs
- assertwrapper.cs
- Manipulation.cs
- TraceProvider.cs
- DataGridComboBoxColumn.cs
- BitmapEffectInput.cs
- WebContext.cs
- WindowsTitleBar.cs
- SmtpNtlmAuthenticationModule.cs
- ErrorActivity.cs
- AxWrapperGen.cs
- BindableTemplateBuilder.cs
- SafeUserTokenHandle.cs
- CardSpaceException.cs
- FormatStringEditor.cs
- TextSimpleMarkerProperties.cs
- Point3DCollection.cs
- NetworkInformationPermission.cs
- wgx_exports.cs
- DataRecordInternal.cs
- ImageAttributes.cs
- precedingsibling.cs
- XamlStyleSerializer.cs
- OleDbException.cs
- HostTimeoutsElement.cs