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
- XPathChildIterator.cs
- ObjectAnimationUsingKeyFrames.cs
- GC.cs
- SemanticBasicElement.cs
- PeerCollaborationPermission.cs
- Privilege.cs
- AppDomainUnloadedException.cs
- DriveInfo.cs
- EncoderReplacementFallback.cs
- PerfCounters.cs
- MetadataCache.cs
- XPathScanner.cs
- ClientRoleProvider.cs
- XmlDataImplementation.cs
- DynamicDataManager.cs
- TextServicesCompartmentEventSink.cs
- Root.cs
- followingquery.cs
- EndOfStreamException.cs
- ChangeConflicts.cs
- DataStorage.cs
- AnimationTimeline.cs
- DataKey.cs
- WindowsSecurityTokenAuthenticator.cs
- AsyncOperation.cs
- Globals.cs
- FacetValues.cs
- Misc.cs
- DrawingState.cs
- OperationContractGenerationContext.cs
- OutputScopeManager.cs
- _NestedSingleAsyncResult.cs
- TagMapInfo.cs
- CancellationHandler.cs
- TextTreeNode.cs
- DataGridViewCellPaintingEventArgs.cs
- SchemaSetCompiler.cs
- _CommandStream.cs
- Region.cs
- AppDomainUnloadedException.cs
- WinFormsUtils.cs
- BitmapImage.cs
- XamlSerializationHelper.cs
- MetadataItem.cs
- PageParserFilter.cs
- TypeLibConverter.cs
- SectionXmlInfo.cs
- Html32TextWriter.cs
- CommandHelpers.cs
- PrincipalPermission.cs
- HtmlFormWrapper.cs
- DataKeyPropertyAttribute.cs
- TypeDescriptionProviderAttribute.cs
- SqlCommandSet.cs
- ServerValidateEventArgs.cs
- DoubleConverter.cs
- LinqDataSourceContextEventArgs.cs
- ObservableCollection.cs
- RSACryptoServiceProvider.cs
- Rect3DConverter.cs
- PrintPreviewGraphics.cs
- TemplateBindingExpressionConverter.cs
- SqlDataReaderSmi.cs
- HiddenFieldPageStatePersister.cs
- ChannelPool.cs
- PersonalizationProviderCollection.cs
- ManipulationStartedEventArgs.cs
- ControlParameter.cs
- EventSourceCreationData.cs
- DataRelationCollection.cs
- XmlAttributeOverrides.cs
- DoubleAnimationUsingPath.cs
- XPathPatternParser.cs
- Literal.cs
- TabControlCancelEvent.cs
- XmlChildNodes.cs
- UntrustedRecipientException.cs
- EventListenerClientSide.cs
- IPGlobalProperties.cs
- EDesignUtil.cs
- DiagnosticsConfigurationHandler.cs
- SQLInt32.cs
- GeneralTransform.cs
- SqlCachedBuffer.cs
- ComplexType.cs
- FormsAuthenticationUserCollection.cs
- CryptoProvider.cs
- DirectoryInfo.cs
- MethodImplAttribute.cs
- TimeoutValidationAttribute.cs
- XmlDataSourceDesigner.cs
- InvokeDelegate.cs
- CheckBoxPopupAdapter.cs
- XmlIlGenerator.cs
- ResourceContainer.cs
- ToolStripItemBehavior.cs
- InstallerTypeAttribute.cs
- XmlSchemaAttributeGroupRef.cs
- XpsColorContext.cs
- cookiecontainer.cs