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
- DatatypeImplementation.cs
- OrthographicCamera.cs
- NavigationFailedEventArgs.cs
- SingleKeyFrameCollection.cs
- ValueUtilsSmi.cs
- RootProfilePropertySettingsCollection.cs
- LinkedResourceCollection.cs
- IntPtr.cs
- GridViewColumnCollection.cs
- SimpleTypeResolver.cs
- MemoryMappedViewStream.cs
- DataGridCommandEventArgs.cs
- ReadOnlyDictionary.cs
- HwndSubclass.cs
- XPathPatternBuilder.cs
- ClassDataContract.cs
- WebPartDescription.cs
- ModelPerspective.cs
- ApplicationInfo.cs
- ApplicationDirectoryMembershipCondition.cs
- ViewBox.cs
- XmlSchemaInclude.cs
- SQLDateTimeStorage.cs
- PkcsMisc.cs
- ToolZoneDesigner.cs
- Assembly.cs
- HtmlFormAdapter.cs
- WindowsRebar.cs
- EditorZoneBase.cs
- ToolStripItemImageRenderEventArgs.cs
- HitTestFilterBehavior.cs
- DragEventArgs.cs
- DBBindings.cs
- PersistenceTask.cs
- XmlChoiceIdentifierAttribute.cs
- RoleBoolean.cs
- PointAnimationUsingKeyFrames.cs
- RepeaterDesigner.cs
- CodeDelegateCreateExpression.cs
- RijndaelManagedTransform.cs
- NetSectionGroup.cs
- ExpressionBindingCollection.cs
- SizeConverter.cs
- EntityContainerRelationshipSetEnd.cs
- Cloud.cs
- GeometryDrawing.cs
- JsonUriDataContract.cs
- GridViewRowCollection.cs
- DataSourceProvider.cs
- ImageFormat.cs
- ExtenderProviderService.cs
- Emitter.cs
- CounterSampleCalculator.cs
- FunctionNode.cs
- WebServiceEndpoint.cs
- DataTable.cs
- Brush.cs
- MethodSet.cs
- ObfuscateAssemblyAttribute.cs
- LinqDataSourceEditData.cs
- IdentityValidationException.cs
- TreeViewEvent.cs
- HwndSourceParameters.cs
- AuthenticateEventArgs.cs
- DashStyle.cs
- MatrixCamera.cs
- HttpModuleActionCollection.cs
- DesignTimeSiteMapProvider.cs
- Semaphore.cs
- ClientData.cs
- SqlSelectStatement.cs
- CultureData.cs
- TraceLevelStore.cs
- WorkflowRuntimeServiceElementCollection.cs
- TraceHandlerErrorFormatter.cs
- SqlTransaction.cs
- SqlTransaction.cs
- ViewStateException.cs
- UnsafeNativeMethods.cs
- __TransparentProxy.cs
- XmlSignatureProperties.cs
- CultureData.cs
- TreeView.cs
- AssemblyAttributesGoHere.cs
- XmlArrayAttribute.cs
- TimeSpanMinutesConverter.cs
- XmlValidatingReaderImpl.cs
- TemplateControlCodeDomTreeGenerator.cs
- UIAgentRequest.cs
- DispatchRuntime.cs
- PermissionSetTriple.cs
- CodeTypeMemberCollection.cs
- TabItemAutomationPeer.cs
- ButtonChrome.cs
- Point3DIndependentAnimationStorage.cs
- XPathChildIterator.cs
- CheckableControlBaseAdapter.cs
- ArraySubsetEnumerator.cs
- TrustLevelCollection.cs
- AsymmetricSignatureFormatter.cs