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
- BamlTreeMap.cs
- PropertyGridView.cs
- SolidColorBrush.cs
- ProtocolsConfigurationEntry.cs
- Pool.cs
- PKCS1MaskGenerationMethod.cs
- SchemaImporterExtensionElement.cs
- ActivationServices.cs
- DataGridTextBoxColumn.cs
- IndicCharClassifier.cs
- SspiSafeHandles.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- WebPermission.cs
- ResourceKey.cs
- ToolStripButton.cs
- Inflater.cs
- TypePresenter.xaml.cs
- RadioButtonStandardAdapter.cs
- ManipulationLogic.cs
- Guid.cs
- ToolStripItemEventArgs.cs
- RuleSettings.cs
- CompModSwitches.cs
- MembershipUser.cs
- MatrixAnimationUsingPath.cs
- ProxyAssemblyNotLoadedException.cs
- Odbc32.cs
- IPeerNeighbor.cs
- SafeBitVector32.cs
- ClaimSet.cs
- ScriptModule.cs
- EventArgs.cs
- FieldInfo.cs
- XmlnsCache.cs
- WeakEventTable.cs
- CommandManager.cs
- InvalidDocumentContentsException.cs
- datacache.cs
- AssemblyHash.cs
- XmlHierarchyData.cs
- DelayedRegex.cs
- EncryptedReference.cs
- ForEachDesigner.xaml.cs
- ClientSettings.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ExcludePathInfo.cs
- Calendar.cs
- FixedSOMTableRow.cs
- FunctionQuery.cs
- ProfileInfo.cs
- BordersPage.cs
- TreeView.cs
- SqlBuilder.cs
- UrlPropertyAttribute.cs
- MenuItemStyle.cs
- SystemTcpStatistics.cs
- sqlinternaltransaction.cs
- SiteMapHierarchicalDataSourceView.cs
- TextCompositionManager.cs
- XmlFormatReaderGenerator.cs
- SoapAttributeAttribute.cs
- EventHandlers.cs
- ArrayExtension.cs
- LocalFileSettingsProvider.cs
- AlignmentXValidation.cs
- SourceElementsCollection.cs
- KnownTypeDataContractResolver.cs
- ConfigurationStrings.cs
- DebugTraceHelper.cs
- MultilineStringConverter.cs
- AsymmetricSignatureFormatter.cs
- MachineKeySection.cs
- ProgressPage.cs
- PointKeyFrameCollection.cs
- BrowserCapabilitiesFactory35.cs
- ToolTipAutomationPeer.cs
- Font.cs
- SpeechRecognitionEngine.cs
- SizeLimitedCache.cs
- GeometryValueSerializer.cs
- LoadMessageLogger.cs
- GradientBrush.cs
- WebGetAttribute.cs
- XmlDictionaryReaderQuotas.cs
- EditorBrowsableAttribute.cs
- WeakReferenceList.cs
- DataListItemEventArgs.cs
- ExceptionHandlersDesigner.cs
- TextEndOfSegment.cs
- GenericNameHandler.cs
- StrongNameMembershipCondition.cs
- UnitySerializationHolder.cs
- Utils.cs
- MetabaseSettings.cs
- TimeSpanStorage.cs
- NamespaceMapping.cs
- LockCookie.cs
- DataGridViewComponentPropertyGridSite.cs
- NextPreviousPagerField.cs