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
- ScrollEventArgs.cs
- FixedTextBuilder.cs
- Container.cs
- Rect3DValueSerializer.cs
- CLSCompliantAttribute.cs
- ProjectionAnalyzer.cs
- VectorCollectionValueSerializer.cs
- Select.cs
- WindowsMenu.cs
- Aggregates.cs
- SendMailErrorEventArgs.cs
- StdRegProviderWrapper.cs
- XmlHierarchicalEnumerable.cs
- LogManagementAsyncResult.cs
- AuthorizationSection.cs
- SingleTagSectionHandler.cs
- AnnotationStore.cs
- ITextView.cs
- AnimationStorage.cs
- PerformanceCounterManager.cs
- EdmPropertyAttribute.cs
- ProbeMatchesCD1.cs
- BaseDataBoundControl.cs
- DecodeHelper.cs
- SqlTriggerAttribute.cs
- DataSourceConverter.cs
- DesignerDataStoredProcedure.cs
- HeaderPanel.cs
- JoinGraph.cs
- DES.cs
- Button.cs
- ToolStripHighContrastRenderer.cs
- ResourceDescriptionAttribute.cs
- TabPanel.cs
- NamespaceCollection.cs
- ConcatQueryOperator.cs
- ParenthesizePropertyNameAttribute.cs
- AutomationElementCollection.cs
- AutomationIdentifierGuids.cs
- StructuredTypeEmitter.cs
- RelationshipConstraintValidator.cs
- XLinq.cs
- UseLicense.cs
- ResourcePermissionBaseEntry.cs
- DiscoveryClientReferences.cs
- SqlTypeConverter.cs
- IsolatedStoragePermission.cs
- GZipStream.cs
- IsolatedStorageFilePermission.cs
- Transform3D.cs
- ResourceReader.cs
- SelectedDatesCollection.cs
- ExceptionUtil.cs
- LockRecursionException.cs
- FormViewRow.cs
- CqlWriter.cs
- ScrollChrome.cs
- XmlArrayAttribute.cs
- PageBuildProvider.cs
- RelatedCurrencyManager.cs
- NotFiniteNumberException.cs
- DataServiceExpressionVisitor.cs
- ZeroOpNode.cs
- XmlSchemaType.cs
- InvalidDataException.cs
- ExpressionBuilder.cs
- BuildProviderCollection.cs
- GeometryGroup.cs
- RSAPKCS1KeyExchangeFormatter.cs
- XmlSchemaAnnotated.cs
- MultiSelectRootGridEntry.cs
- AppSettingsReader.cs
- TypeConverterHelper.cs
- MeasurementDCInfo.cs
- AssemblyBuilderData.cs
- DetailsViewUpdatedEventArgs.cs
- MenuItemBindingCollection.cs
- CommandCollectionEditor.cs
- BitmapDownload.cs
- XmlDownloadManager.cs
- XmlSerializerObjectSerializer.cs
- InvalidOleVariantTypeException.cs
- ContentOperations.cs
- FormClosingEvent.cs
- BaseComponentEditor.cs
- SerializationAttributes.cs
- Triangle.cs
- WizardForm.cs
- OleDbDataAdapter.cs
- TemplateBindingExpressionConverter.cs
- HtmlTitle.cs
- NotifyCollectionChangedEventArgs.cs
- EntityDataSourceContextDisposingEventArgs.cs
- ExpressionBuilderContext.cs
- InstallerTypeAttribute.cs
- CompositeDataBoundControl.cs
- SiteMapNodeItemEventArgs.cs
- CharacterMetrics.cs
- ConnectionStringsExpressionBuilder.cs
- NegatedCellConstant.cs