Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / RelationshipEndMember.cs / 1305376 / RelationshipEndMember.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Text; using System.Data.Common; namespace System.Data.Metadata.Edm { ////// Initializes a new instance of the RelationshipEndMember class /// public abstract class RelationshipEndMember : EdmMember { #region Constructors ////// Initializes a new instance of RelationshipEndMember /// /// name of the relationship end member /// Ref type that this end refers to /// The multiplicity of this relationship end ///Thrown if name or endRefType arguments is null ///Thrown if name argument is empty string internal RelationshipEndMember(string name, RefType endRefType, RelationshipMultiplicity multiplicity) : base(name, TypeUsage.Create(endRefType, new FacetValues{ Nullable = false })) { _relationshipMultiplicity = multiplicity; _deleteBehavior = OperationAction.None; } #endregion #region Fields private OperationAction _deleteBehavior; private RelationshipMultiplicity _relationshipMultiplicity; #endregion #region Properties ////// Returns the operational behaviour for this end /// [MetadataProperty(BuiltInTypeKind.OperationAction, true)] public OperationAction DeleteBehavior { get { return _deleteBehavior; } internal set { Util.ThrowIfReadOnly(this); _deleteBehavior = value; } } ////// Returns the multiplicity for this relationship end /// [MetadataProperty(BuiltInTypeKind.RelationshipMultiplicity, false)] public RelationshipMultiplicity RelationshipMultiplicity { get { return _relationshipMultiplicity; } } #endregion public EntityType GetEntityType() { if (TypeUsage == null) return null; return (EntityType)((RefType)TypeUsage.EdmType).ElementType; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Text; using System.Data.Common; namespace System.Data.Metadata.Edm { ////// Initializes a new instance of the RelationshipEndMember class /// public abstract class RelationshipEndMember : EdmMember { #region Constructors ////// Initializes a new instance of RelationshipEndMember /// /// name of the relationship end member /// Ref type that this end refers to /// The multiplicity of this relationship end ///Thrown if name or endRefType arguments is null ///Thrown if name argument is empty string internal RelationshipEndMember(string name, RefType endRefType, RelationshipMultiplicity multiplicity) : base(name, TypeUsage.Create(endRefType, new FacetValues{ Nullable = false })) { _relationshipMultiplicity = multiplicity; _deleteBehavior = OperationAction.None; } #endregion #region Fields private OperationAction _deleteBehavior; private RelationshipMultiplicity _relationshipMultiplicity; #endregion #region Properties ////// Returns the operational behaviour for this end /// [MetadataProperty(BuiltInTypeKind.OperationAction, true)] public OperationAction DeleteBehavior { get { return _deleteBehavior; } internal set { Util.ThrowIfReadOnly(this); _deleteBehavior = value; } } ////// Returns the multiplicity for this relationship end /// [MetadataProperty(BuiltInTypeKind.RelationshipMultiplicity, false)] public RelationshipMultiplicity RelationshipMultiplicity { get { return _relationshipMultiplicity; } } #endregion public EntityType GetEntityType() { if (TypeUsage == null) return null; return (EntityType)((RefType)TypeUsage.EdmType).ElementType; } } } // 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
- HttpAsyncResult.cs
- KeyValuePairs.cs
- OpenTypeLayout.cs
- AnnotationResourceCollection.cs
- EntityDataSourceState.cs
- ObjectDataSourceView.cs
- ClientConfigurationHost.cs
- ISCIIEncoding.cs
- SchemaLookupTable.cs
- Types.cs
- FontClient.cs
- Marshal.cs
- exports.cs
- AsmxEndpointPickerExtension.cs
- TimerElapsedEvenArgs.cs
- GridErrorDlg.cs
- XmlDataCollection.cs
- _NetRes.cs
- SortAction.cs
- DataSourceControl.cs
- Single.cs
- TimeIntervalCollection.cs
- Convert.cs
- GridItemCollection.cs
- NativeWrapper.cs
- SectionInput.cs
- WsdlParser.cs
- DataGridViewTextBoxColumn.cs
- SplineKeyFrames.cs
- SafeCryptContextHandle.cs
- DocumentApplication.cs
- Gdiplus.cs
- MemoryPressure.cs
- ControlValuePropertyAttribute.cs
- CodeConstructor.cs
- DocumentGrid.cs
- SqlMethodCallConverter.cs
- Token.cs
- SystemIPAddressInformation.cs
- PeerResolverBindingElement.cs
- SerializableAttribute.cs
- RemoteWebConfigurationHostStream.cs
- WindowsEditBoxRange.cs
- MsdtcWrapper.cs
- ComponentEditorForm.cs
- EntityAdapter.cs
- StringHandle.cs
- DoubleLinkList.cs
- CreateRefExpr.cs
- NamespaceMapping.cs
- CaseInsensitiveOrdinalStringComparer.cs
- OutOfMemoryException.cs
- SystemException.cs
- Pair.cs
- oledbconnectionstring.cs
- RoleGroupCollection.cs
- versioninfo.cs
- WpfKnownTypeInvoker.cs
- ScrollViewer.cs
- XmlAttributeAttribute.cs
- IPAddressCollection.cs
- IndentTextWriter.cs
- Misc.cs
- PaintEvent.cs
- RijndaelCryptoServiceProvider.cs
- sqlcontext.cs
- AppDomainShutdownMonitor.cs
- FloaterParaClient.cs
- DataBoundLiteralControl.cs
- DesignerVerbCollection.cs
- TimeStampChecker.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- OdbcHandle.cs
- DataGridViewButtonColumn.cs
- DeploymentSectionCache.cs
- SqlNotificationRequest.cs
- TextChangedEventArgs.cs
- SqlReorderer.cs
- DecimalAnimation.cs
- HTTPNotFoundHandler.cs
- DataIdProcessor.cs
- RequestCachingSection.cs
- ServiceManager.cs
- SoapAttributeAttribute.cs
- SortFieldComparer.cs
- SoapCodeExporter.cs
- EdmType.cs
- embossbitmapeffect.cs
- CompositeDataBoundControl.cs
- FigureParaClient.cs
- MultiPageTextView.cs
- FieldTemplateFactory.cs
- Axis.cs
- VideoDrawing.cs
- SocketException.cs
- _BaseOverlappedAsyncResult.cs
- WebPartDesigner.cs
- CommandPlan.cs
- WebPartConnectionsEventArgs.cs
- AQNBuilder.cs