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
- TextSelectionHighlightLayer.cs
- XmlnsCache.cs
- ReadOnlyHierarchicalDataSource.cs
- AssemblyAttributesGoHere.cs
- Int32AnimationBase.cs
- EmptyStringExpandableObjectConverter.cs
- AccessDataSourceView.cs
- Animatable.cs
- CharacterMetrics.cs
- DiscoveryReferences.cs
- SymmetricSecurityProtocol.cs
- _AutoWebProxyScriptEngine.cs
- Utils.cs
- HasCopySemanticsAttribute.cs
- ByteArrayHelperWithString.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ThreadStaticAttribute.cs
- MultipartIdentifier.cs
- KeysConverter.cs
- SpeechRecognitionEngine.cs
- CalendarDay.cs
- MatrixAnimationUsingKeyFrames.cs
- HeaderPanel.cs
- ExcCanonicalXml.cs
- DataGridItemEventArgs.cs
- GZipStream.cs
- XmlElementAttribute.cs
- DataGridViewTextBoxCell.cs
- PageStatePersister.cs
- CodeGenerator.cs
- LayoutTableCell.cs
- _OSSOCK.cs
- XmlSchemaAttribute.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- XmlCharCheckingWriter.cs
- HostProtectionPermission.cs
- EventRoute.cs
- StorageEntityContainerMapping.cs
- ListViewDeleteEventArgs.cs
- XmlLanguage.cs
- TextTreeExtractElementUndoUnit.cs
- StateDesigner.Helpers.cs
- BitmapEditor.cs
- GenerateScriptTypeAttribute.cs
- OLEDB_Util.cs
- AdapterUtil.cs
- BindingExpression.cs
- Baml2006Reader.cs
- ScalarType.cs
- TdsParser.cs
- ProxyElement.cs
- MatrixKeyFrameCollection.cs
- SQLDateTime.cs
- StorageEndPropertyMapping.cs
- ComplexType.cs
- StackBuilderSink.cs
- CryptoApi.cs
- ShutDownListener.cs
- DataList.cs
- DesignerActionService.cs
- ReaderWriterLockWrapper.cs
- ChannelDispatcher.cs
- MouseCaptureWithinProperty.cs
- ConfigurationFileMap.cs
- COM2PropertyDescriptor.cs
- XsdCachingReader.cs
- XmlSchemaObjectCollection.cs
- AuthenticationModuleElementCollection.cs
- DetailsViewInsertedEventArgs.cs
- DocumentOrderQuery.cs
- RtfToXamlLexer.cs
- ToolStripContainerActionList.cs
- BamlLocalizableResourceKey.cs
- MenuItemBindingCollection.cs
- MergablePropertyAttribute.cs
- SystemPens.cs
- ClientSettingsSection.cs
- VisualBasicSettingsHandler.cs
- TrackingWorkflowEventArgs.cs
- ThreadNeutralSemaphore.cs
- SequentialUshortCollection.cs
- XMLUtil.cs
- RowToFieldTransformer.cs
- DataObjectCopyingEventArgs.cs
- GenericUriParser.cs
- Point.cs
- ObjectDataSourceEventArgs.cs
- XmlWriter.cs
- ResponseBodyWriter.cs
- FlowDocumentReader.cs
- MenuBase.cs
- CodeSnippetCompileUnit.cs
- StylusPointPropertyUnit.cs
- ToolStripOverflowButton.cs
- UseLicense.cs
- MouseButtonEventArgs.cs
- XmlSchemaExporter.cs
- FormViewDeletedEventArgs.cs
- PrintPageEvent.cs
- CommandDesigner.cs