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
- XmlSiteMapProvider.cs
- InitializationEventAttribute.cs
- AmbientValueAttribute.cs
- AppliedDeviceFiltersDialog.cs
- ValidationError.cs
- StatusStrip.cs
- ComboBoxRenderer.cs
- EditorPart.cs
- NamedElement.cs
- WindowPatternIdentifiers.cs
- SchemaTableOptionalColumn.cs
- HiddenField.cs
- WebMessageEncoderFactory.cs
- userdatakeys.cs
- DateTimeValueSerializer.cs
- SourceItem.cs
- TextSimpleMarkerProperties.cs
- HttpFormatExtensions.cs
- InheritedPropertyDescriptor.cs
- XamlTypeMapper.cs
- _LazyAsyncResult.cs
- DataContract.cs
- ComboBoxAutomationPeer.cs
- DesignSurfaceEvent.cs
- BatchStream.cs
- XmlSchemaAnyAttribute.cs
- RequestCachePolicyConverter.cs
- Tokenizer.cs
- CompiledQueryCacheEntry.cs
- CatalogPart.cs
- SqlDataReaderSmi.cs
- ButtonBaseDesigner.cs
- TokenFactoryBase.cs
- CodeGroup.cs
- StylusSystemGestureEventArgs.cs
- DivideByZeroException.cs
- ToolStripPanelRow.cs
- SqlPersonalizationProvider.cs
- NodeCounter.cs
- LostFocusEventManager.cs
- DesignerCalendarAdapter.cs
- NegatedCellConstant.cs
- ImageInfo.cs
- SelectionPattern.cs
- MatrixCamera.cs
- OpacityConverter.cs
- LocalizationParserHooks.cs
- Compiler.cs
- FontStyles.cs
- SystemInfo.cs
- AdornerPresentationContext.cs
- StructuralComparisons.cs
- FrugalList.cs
- HtmlInputButton.cs
- SecurityDescriptor.cs
- OdbcInfoMessageEvent.cs
- SqlInternalConnectionTds.cs
- VerbConverter.cs
- TypefaceCollection.cs
- TimeZoneNotFoundException.cs
- SqlProfileProvider.cs
- ElapsedEventArgs.cs
- CompilerErrorCollection.cs
- WebReferenceOptions.cs
- CellTreeNodeVisitors.cs
- Visual3DCollection.cs
- SqlCacheDependencyDatabase.cs
- SoapElementAttribute.cs
- PeerCollaboration.cs
- DescendantQuery.cs
- SrgsElementFactoryCompiler.cs
- Scene3D.cs
- Condition.cs
- ExpandableObjectConverter.cs
- PathGradientBrush.cs
- BamlResourceSerializer.cs
- WebPartRestoreVerb.cs
- SigningDialog.cs
- EventLogTraceListener.cs
- ListItemDetailViewAttribute.cs
- FormsAuthenticationTicket.cs
- RoleManagerEventArgs.cs
- PeoplePickerWrapper.cs
- DataGridViewColumn.cs
- CapiSafeHandles.cs
- DrawingContextWalker.cs
- StringTraceRecord.cs
- BevelBitmapEffect.cs
- TemplateBuilder.cs
- WaveHeader.cs
- RadioButton.cs
- NativeMethods.cs
- Renderer.cs
- StdRegProviderWrapper.cs
- FlowDocumentReaderAutomationPeer.cs
- ChtmlTextWriter.cs
- AutomationEventArgs.cs
- FreezableCollection.cs
- Select.cs
- WebPartHelpVerb.cs