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
- ComponentEditorForm.cs
- Ops.cs
- SpeechSynthesizer.cs
- StickyNoteAnnotations.cs
- Inline.cs
- UrlAuthorizationModule.cs
- ColorConvertedBitmap.cs
- BinaryParser.cs
- DataGridItemEventArgs.cs
- SQLInt32.cs
- InfiniteTimeSpanConverter.cs
- DesignerVerb.cs
- SecurityPermission.cs
- DataColumn.cs
- PageAdapter.cs
- CmsUtils.cs
- NullableDoubleMinMaxAggregationOperator.cs
- updateconfighost.cs
- ByteStream.cs
- CompilationUnit.cs
- SoapHeaderAttribute.cs
- VirtualPath.cs
- Grid.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- WsiProfilesElementCollection.cs
- PropertyChangeTracker.cs
- TreeView.cs
- EventSinkActivity.cs
- ModelUIElement3D.cs
- CssTextWriter.cs
- DataGridHelper.cs
- ManualResetEvent.cs
- XamlFilter.cs
- WindowsRegion.cs
- KeyTimeConverter.cs
- DocobjHost.cs
- DateTimeOffset.cs
- DescendentsWalkerBase.cs
- TitleStyle.cs
- UTF8Encoding.cs
- WebPartEditorApplyVerb.cs
- CodeCompiler.cs
- Debug.cs
- StringInfo.cs
- GroupLabel.cs
- EncoderExceptionFallback.cs
- Speller.cs
- DesignerAdapterUtil.cs
- InvalidWMPVersionException.cs
- ExceptionRoutedEventArgs.cs
- StringFormat.cs
- OdbcParameter.cs
- ExtensionWindowHeader.cs
- WindowsAuthenticationEventArgs.cs
- Normalization.cs
- ReaderWriterLockWrapper.cs
- WebException.cs
- Thickness.cs
- WaitHandleCannotBeOpenedException.cs
- MulticastNotSupportedException.cs
- SemaphoreSecurity.cs
- ManagementEventArgs.cs
- EntitySqlQueryBuilder.cs
- TiffBitmapEncoder.cs
- Blend.cs
- Input.cs
- ContainerSelectorGlyph.cs
- ListViewInsertEventArgs.cs
- HierarchicalDataSourceConverter.cs
- XPathItem.cs
- RowsCopiedEventArgs.cs
- MetadataSource.cs
- LoginView.cs
- PassportAuthenticationEventArgs.cs
- ColumnHeader.cs
- Parallel.cs
- ColumnResizeAdorner.cs
- Errors.cs
- ControlCachePolicy.cs
- Win32KeyboardDevice.cs
- RelationshipType.cs
- XmlSchemaSet.cs
- NominalTypeEliminator.cs
- SoapHeaders.cs
- util.cs
- LocalizationCodeDomSerializer.cs
- Animatable.cs
- ResolvedKeyFrameEntry.cs
- StringFreezingAttribute.cs
- BindingGroup.cs
- GeneralTransformGroup.cs
- BamlBinaryReader.cs
- GPPOINT.cs
- UniqueConstraint.cs
- infer.cs
- SchemaImporterExtensionElementCollection.cs
- ToolStripItemTextRenderEventArgs.cs
- FontStyleConverter.cs
- SafeReversePInvokeHandle.cs
- SkewTransform.cs