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
- counter.cs
- WinCategoryAttribute.cs
- SyndicationElementExtensionCollection.cs
- SystemThemeKey.cs
- Condition.cs
- XmlTextReaderImplHelpers.cs
- ArgumentException.cs
- HWStack.cs
- RowsCopiedEventArgs.cs
- QueueException.cs
- RectValueSerializer.cs
- OdbcPermission.cs
- SystemIPv6InterfaceProperties.cs
- ArithmeticException.cs
- ScriptManager.cs
- Propagator.Evaluator.cs
- StylusLogic.cs
- exports.cs
- ConstraintConverter.cs
- BrowserCapabilitiesFactory.cs
- objectresult_tresulttype.cs
- UpdatableGenericsFeature.cs
- TimeoutConverter.cs
- TraceXPathNavigator.cs
- DynamicHyperLink.cs
- FormViewPagerRow.cs
- TextParaLineResult.cs
- TransformerInfoCollection.cs
- QueryHandler.cs
- GroupBoxRenderer.cs
- X509ThumbprintKeyIdentifierClause.cs
- FlowDocumentPage.cs
- TableLayoutCellPaintEventArgs.cs
- IDataContractSurrogate.cs
- XamlFigureLengthSerializer.cs
- SchemaTableColumn.cs
- TemplateNameScope.cs
- ParentControlDesigner.cs
- RegistrationServices.cs
- Size.cs
- XmlSerializationWriter.cs
- XmlSerializationWriter.cs
- InstanceHandle.cs
- FixedSOMImage.cs
- WmlCommandAdapter.cs
- GridViewEditEventArgs.cs
- DrawListViewSubItemEventArgs.cs
- PackageRelationship.cs
- BlockExpression.cs
- xamlnodes.cs
- SafeReversePInvokeHandle.cs
- DataGridViewRowsRemovedEventArgs.cs
- NavigationExpr.cs
- WebPartConnectionsEventArgs.cs
- ViewCellSlot.cs
- QilLoop.cs
- peernodeimplementation.cs
- Merger.cs
- KeyManager.cs
- Stacktrace.cs
- GridToolTip.cs
- UIntPtr.cs
- BinaryUtilClasses.cs
- BufferModeSettings.cs
- WebServiceFault.cs
- UInt32.cs
- DependencySource.cs
- PrintingPermissionAttribute.cs
- SerializerProvider.cs
- StringToken.cs
- AsyncPostBackTrigger.cs
- IdentifierCreationService.cs
- DataControlReference.cs
- DataBindingExpressionBuilder.cs
- StorageConditionPropertyMapping.cs
- FaultReasonText.cs
- MeshGeometry3D.cs
- RemotingException.cs
- EventSinkHelperWriter.cs
- PrintPreviewGraphics.cs
- DataContract.cs
- ValidationSummary.cs
- HtmlTernaryTree.cs
- QilInvokeEarlyBound.cs
- JapaneseLunisolarCalendar.cs
- OperationPickerDialog.designer.cs
- BuildManager.cs
- NamespaceExpr.cs
- PowerModeChangedEventArgs.cs
- CodeTypeParameter.cs
- SafeCryptoHandles.cs
- DataSourceDescriptorCollection.cs
- ManagedFilter.cs
- GeometryCombineModeValidation.cs
- WorkflowViewStateService.cs
- OleCmdHelper.cs
- RootNamespaceAttribute.cs
- ServiceHttpHandlerFactory.cs
- SrgsRulesCollection.cs
- SecurityTokenException.cs