Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / RefType.cs / 2 / 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
- PropertyTabAttribute.cs
- InProcStateClientManager.cs
- ImplicitInputBrush.cs
- SqlConnectionPoolGroupProviderInfo.cs
- ChildDocumentBlock.cs
- input.cs
- FileLogRecord.cs
- TableDetailsRow.cs
- CompatibleComparer.cs
- ILGenerator.cs
- Normalization.cs
- Root.cs
- ModelUIElement3D.cs
- webeventbuffer.cs
- PreviewPrintController.cs
- AttributeCollection.cs
- SchemaNames.cs
- EventListener.cs
- ValueChangedEventManager.cs
- RowSpanVector.cs
- WebConfigurationHost.cs
- DefaultPrintController.cs
- JavascriptCallbackBehaviorAttribute.cs
- GeometryDrawing.cs
- PeerNameResolver.cs
- ClientType.cs
- Resources.Designer.cs
- WebInvokeAttribute.cs
- MimeReflector.cs
- EmptyElement.cs
- RepeaterDataBoundAdapter.cs
- Utils.cs
- DebugViewWriter.cs
- Triplet.cs
- Message.cs
- GregorianCalendar.cs
- WindowProviderWrapper.cs
- RequestUriProcessor.cs
- ProviderConnectionPointCollection.cs
- ExtensionFile.cs
- FragmentNavigationEventArgs.cs
- BindingSource.cs
- PageCodeDomTreeGenerator.cs
- TimeSpanConverter.cs
- SecureConversationServiceCredential.cs
- XMLSyntaxException.cs
- DocumentPageTextView.cs
- SQLDateTime.cs
- UIAgentAsyncEndRequest.cs
- DoubleLinkListEnumerator.cs
- ListBox.cs
- ISAPIApplicationHost.cs
- SystemNetworkInterface.cs
- Message.cs
- MouseCaptureWithinProperty.cs
- Native.cs
- ButtonBaseDesigner.cs
- UserControl.cs
- WebFormDesignerActionService.cs
- BypassElement.cs
- JsonEncodingStreamWrapper.cs
- X509CertificateStore.cs
- QilNode.cs
- MetadataHelper.cs
- StreamInfo.cs
- validationstate.cs
- ExtenderProviderService.cs
- ImageSource.cs
- KeyboardNavigation.cs
- DataSourceControl.cs
- PathFigure.cs
- StructuredType.cs
- SoapException.cs
- InheritanceContextHelper.cs
- HttpConfigurationSystem.cs
- SerializationFieldInfo.cs
- SqlNodeAnnotation.cs
- CodeTypeConstructor.cs
- LeafCellTreeNode.cs
- IsolatedStorageFile.cs
- ErrorReporting.cs
- SystemResourceHost.cs
- DataListItem.cs
- EntityTypeBase.cs
- SQLByte.cs
- cache.cs
- ToolStripLocationCancelEventArgs.cs
- ConfigurationStrings.cs
- StructuredTypeInfo.cs
- WindowsRichEdit.cs
- UserMapPath.cs
- ToolStripControlHost.cs
- EntityCollectionChangedParams.cs
- DocumentSequenceHighlightLayer.cs
- ProviderIncompatibleException.cs
- ErrorFormatterPage.cs
- IISMapPath.cs
- InvalidCastException.cs
- PEFileEvidenceFactory.cs
- MimePart.cs