Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextParaClient.cs
- CompilerInfo.cs
- DocumentEventArgs.cs
- HostElement.cs
- ServiceSecurityContext.cs
- AuthenticationServiceManager.cs
- MissingMethodException.cs
- TimelineGroup.cs
- PenThreadPool.cs
- TextBoxAutomationPeer.cs
- DataGridViewUtilities.cs
- WindowsStatusBar.cs
- SupportsEventValidationAttribute.cs
- GorillaCodec.cs
- AnnotationComponentChooser.cs
- PopOutPanel.cs
- PartialArray.cs
- DrawingBrush.cs
- DataServiceEntityAttribute.cs
- Transform.cs
- OdbcDataAdapter.cs
- _UncName.cs
- ObjectItemNoOpAssemblyLoader.cs
- DragEvent.cs
- BitArray.cs
- NetworkStream.cs
- WindowsFormsSynchronizationContext.cs
- DataGridItemEventArgs.cs
- SharedPerformanceCounter.cs
- OciLobLocator.cs
- XmlFormatWriterGenerator.cs
- FrameAutomationPeer.cs
- COM2Properties.cs
- ColorTranslator.cs
- OdbcConnectionStringbuilder.cs
- MDIControlStrip.cs
- NotConverter.cs
- TextCollapsingProperties.cs
- StrokeNodeEnumerator.cs
- PropertyGeneratedEventArgs.cs
- ImageCollectionCodeDomSerializer.cs
- SerializationInfo.cs
- TextParagraphCache.cs
- ProtocolsConfigurationHandler.cs
- DebugHandleTracker.cs
- SchemaType.cs
- HostingEnvironmentWrapper.cs
- SelectionRange.cs
- ControlBuilderAttribute.cs
- Delegate.cs
- MultiDataTrigger.cs
- TextRunProperties.cs
- ReliabilityContractAttribute.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- RelationshipType.cs
- MultiPropertyDescriptorGridEntry.cs
- SoapSchemaImporter.cs
- XmlAttributeOverrides.cs
- _HeaderInfo.cs
- EncodingDataItem.cs
- Visual3DCollection.cs
- BufferedOutputStream.cs
- ObjectNotFoundException.cs
- RelationshipWrapper.cs
- HttpResponseBase.cs
- AttributeEmitter.cs
- HttpCapabilitiesSectionHandler.cs
- ContentControl.cs
- ResourceSet.cs
- UserInitiatedNavigationPermission.cs
- XmlUrlEditor.cs
- DotExpr.cs
- RpcResponse.cs
- DemultiplexingDispatchMessageFormatter.cs
- WindowsImpersonationContext.cs
- AlternateViewCollection.cs
- Button.cs
- OdbcCommand.cs
- SurrogateDataContract.cs
- TypeDescriptorFilterService.cs
- PagedDataSource.cs
- PhonemeEventArgs.cs
- EncryptedKeyIdentifierClause.cs
- InternalBase.cs
- ObjectStorage.cs
- Models.cs
- GenericPrincipal.cs
- Utils.cs
- CheckBox.cs
- SoapSchemaMember.cs
- ExpressionBuilder.cs
- IsolatedStorageSecurityState.cs
- IntSecurity.cs
- CalendarDataBindingHandler.cs
- HttpChannelBindingToken.cs
- OleDbEnumerator.cs
- RegexFCD.cs
- TraceContextEventArgs.cs
- AliasGenerator.cs
- Container.cs