Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / RefType.cs / 1 / 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
- MiniCustomAttributeInfo.cs
- NonVisualControlAttribute.cs
- BamlResourceSerializer.cs
- SignatureHelper.cs
- WebScriptMetadataMessageEncoderFactory.cs
- ObjectConverter.cs
- ButtonBaseAdapter.cs
- InkCollectionBehavior.cs
- FormattedTextSymbols.cs
- WindowsGraphics2.cs
- DirtyTextRange.cs
- SrgsGrammarCompiler.cs
- StringToken.cs
- WebEvents.cs
- HttpApplication.cs
- PartialArray.cs
- documentsequencetextpointer.cs
- ExtensionQuery.cs
- HybridObjectCache.cs
- TypeConverterValueSerializer.cs
- FloaterBaseParagraph.cs
- ImmutablePropertyDescriptorGridEntry.cs
- CapabilitiesPattern.cs
- GridErrorDlg.cs
- ErrorStyle.cs
- ClientRoleProvider.cs
- CapabilitiesState.cs
- DriveInfo.cs
- Style.cs
- ArgumentDirectionHelper.cs
- ProcessHost.cs
- EdmToObjectNamespaceMap.cs
- XmlMessageFormatter.cs
- KnownBoxes.cs
- ClonableStack.cs
- PersonalizationStateInfoCollection.cs
- CodeSnippetCompileUnit.cs
- IDictionary.cs
- SrgsElementFactoryCompiler.cs
- ClientConfigurationHost.cs
- SHA384CryptoServiceProvider.cs
- FixUp.cs
- FileStream.cs
- EntityDataSourceContextCreatingEventArgs.cs
- SmiContextFactory.cs
- WebPermission.cs
- EntityParameterCollection.cs
- TypographyProperties.cs
- DictionaryManager.cs
- FlowStep.cs
- _NestedMultipleAsyncResult.cs
- MouseDevice.cs
- HttpException.cs
- MessageDecoder.cs
- PrimitiveXmlSerializers.cs
- SHA1CryptoServiceProvider.cs
- ToolStripComboBox.cs
- BaseDataListActionList.cs
- HttpListenerRequest.cs
- IndexingContentUnit.cs
- BevelBitmapEffect.cs
- validationstate.cs
- LoadedOrUnloadedOperation.cs
- SimpleFieldTemplateUserControl.cs
- XPathSingletonIterator.cs
- FirewallWrapper.cs
- Descriptor.cs
- RenamedEventArgs.cs
- WindowsListViewSubItem.cs
- SqlDataSourceView.cs
- CodeCastExpression.cs
- RootDesignerSerializerAttribute.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- TemplatePagerField.cs
- TemplateNameScope.cs
- GridViewRowPresenterBase.cs
- XmlSchemaAttribute.cs
- BindingContext.cs
- XmlMtomReader.cs
- Point3D.cs
- ConnectionOrientedTransportChannelFactory.cs
- ProviderSettings.cs
- AppDomainShutdownMonitor.cs
- TreeNodeSelectionProcessor.cs
- TextBoxBase.cs
- KeyInterop.cs
- UnSafeCharBuffer.cs
- TemplatePagerField.cs
- SessionStateModule.cs
- SizeChangedInfo.cs
- Encoding.cs
- ColorContext.cs
- HandlerMappingMemo.cs
- MessageUtil.cs
- AnimationStorage.cs
- ArcSegment.cs
- PropertyMetadata.cs
- ContextMenuAutomationPeer.cs
- Convert.cs
- PropertySegmentSerializer.cs