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
- MetaType.cs
- cookiecontainer.cs
- FindRequestContext.cs
- ObjectDataSourceSelectingEventArgs.cs
- _Connection.cs
- EntitySet.cs
- FirstMatchCodeGroup.cs
- DefaultExpression.cs
- ResourcePermissionBase.cs
- DispatcherBuilder.cs
- MarginsConverter.cs
- IPipelineRuntime.cs
- HtmlTableCell.cs
- TdsParserHelperClasses.cs
- UnmanagedHandle.cs
- X509CertificateChain.cs
- PerfCounterSection.cs
- ExpressionBuilderCollection.cs
- RouteItem.cs
- DynamicResourceExtensionConverter.cs
- Point3DCollection.cs
- HwndHostAutomationPeer.cs
- CodeDomConfigurationHandler.cs
- OdbcConnectionFactory.cs
- StringCollectionMarkupSerializer.cs
- WebServiceEnumData.cs
- GeometryCombineModeValidation.cs
- ColorMatrix.cs
- StreamGeometryContext.cs
- XsltConvert.cs
- Int64Converter.cs
- ContextBase.cs
- ScriptManagerProxy.cs
- SingleStorage.cs
- MexNamedPipeBindingCollectionElement.cs
- HWStack.cs
- LayoutTable.cs
- QueryCacheManager.cs
- XmlException.cs
- TreeNode.cs
- CultureTableRecord.cs
- DatagramAdapter.cs
- StylusDownEventArgs.cs
- EmptyImpersonationContext.cs
- ForwardPositionQuery.cs
- RectValueSerializer.cs
- XmlNamespaceManager.cs
- IdentityValidationException.cs
- StylusEventArgs.cs
- JoinGraph.cs
- StreamBodyWriter.cs
- GradientBrush.cs
- UIElementPropertyUndoUnit.cs
- X509Certificate2Collection.cs
- DataGridViewHeaderCell.cs
- CodeAttributeArgument.cs
- Geometry.cs
- StringUtil.cs
- SoapIgnoreAttribute.cs
- CollectionChangeEventArgs.cs
- precedingquery.cs
- Page.cs
- ActiveXContainer.cs
- DebuggerService.cs
- CodeIterationStatement.cs
- SystemBrushes.cs
- SerializerProvider.cs
- WindowsListViewGroupHelper.cs
- PrinterSettings.cs
- TypeDescriptorFilterService.cs
- UIAgentRequest.cs
- SplineKeyFrames.cs
- ImmComposition.cs
- RepeaterItem.cs
- AutoGeneratedField.cs
- CultureInfoConverter.cs
- Rotation3DAnimation.cs
- Viewport3DAutomationPeer.cs
- ScriptManagerProxy.cs
- OLEDB_Util.cs
- BuilderPropertyEntry.cs
- WpfPayload.cs
- FontWeightConverter.cs
- NavigationCommands.cs
- DrawingContextDrawingContextWalker.cs
- InputLanguageCollection.cs
- MemoryRecordBuffer.cs
- DeadCharTextComposition.cs
- AutomationProperty.cs
- SimpleWebHandlerParser.cs
- RectAnimationClockResource.cs
- StylusEditingBehavior.cs
- ResourcePart.cs
- WindowsProgressbar.cs
- GeneralTransformCollection.cs
- WorkflowApplicationEventArgs.cs
- DoubleAnimationBase.cs
- SchemaNotation.cs
- CellConstant.cs
- Separator.cs