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
- CodeCommentStatementCollection.cs
- UrlPath.cs
- ProbeMatchesCD1.cs
- DiagnosticTraceSource.cs
- DataViewManager.cs
- RadioButton.cs
- BamlTreeNode.cs
- ToolStripDropDown.cs
- BamlReader.cs
- ConfigXmlWhitespace.cs
- ProjectedSlot.cs
- FileSystemWatcher.cs
- BindingMAnagerBase.cs
- FastEncoder.cs
- StaticDataManager.cs
- AuthenticateEventArgs.cs
- MailAddressCollection.cs
- ApplicationContext.cs
- NumericUpDownAccelerationCollection.cs
- _NetworkingPerfCounters.cs
- SaveFileDialog.cs
- XomlCompilerHelpers.cs
- safelink.cs
- HttpContextServiceHost.cs
- loginstatus.cs
- TextOnlyOutput.cs
- PrimitiveXmlSerializers.cs
- StubHelpers.cs
- Module.cs
- OperationFormatStyle.cs
- CommandCollectionEditor.cs
- StdValidatorsAndConverters.cs
- SyndicationDeserializer.cs
- PeerPresenceInfo.cs
- StylusPlugin.cs
- XPathNavigatorKeyComparer.cs
- RoleGroupCollection.cs
- GlobalProxySelection.cs
- OperationAbortedException.cs
- ObjectSelectorEditor.cs
- Annotation.cs
- securestring.cs
- SmiMetaData.cs
- PingOptions.cs
- Control.cs
- BadImageFormatException.cs
- PLINQETWProvider.cs
- Matrix3D.cs
- DecoderReplacementFallback.cs
- ListViewAutomationPeer.cs
- MappedMetaModel.cs
- ExceptionRoutedEventArgs.cs
- SqlPersonalizationProvider.cs
- PartManifestEntry.cs
- PartialTrustVisibleAssembly.cs
- InternalEnumValidator.cs
- DrawingBrush.cs
- TransformerInfoCollection.cs
- XmlSchemaInclude.cs
- GB18030Encoding.cs
- PageTheme.cs
- DataGridViewColumnCollectionDialog.cs
- RoutedEventConverter.cs
- RawStylusActions.cs
- MobileControl.cs
- ChtmlCalendarAdapter.cs
- BinaryCommonClasses.cs
- FileDialog.cs
- InstanceDescriptor.cs
- SqlDataSource.cs
- SkewTransform.cs
- Encoder.cs
- Oid.cs
- XmlSchemaAttributeGroupRef.cs
- HtmlCommandAdapter.cs
- XNodeNavigator.cs
- FacetValues.cs
- SelectorAutomationPeer.cs
- NameScope.cs
- SafeFindHandle.cs
- StringWriter.cs
- Run.cs
- XmlBindingWorker.cs
- ClientSettingsProvider.cs
- DescendentsWalkerBase.cs
- UrlAuthorizationModule.cs
- typedescriptorpermissionattribute.cs
- SqlResolver.cs
- Currency.cs
- httpserverutility.cs
- ConfigurationValidatorBase.cs
- CodeSubDirectory.cs
- TimeoutValidationAttribute.cs
- WebControlAdapter.cs
- ExpandoClass.cs
- IpcChannel.cs
- NetNamedPipeSecurityElement.cs
- BaseProcessor.cs
- PasswordBox.cs
- CookieProtection.cs