RelationshipEndMember.cs source code in C# .NET

Source code for the .NET framework in C#

                        

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 / RelationshipEndMember.cs / 2 / RelationshipEndMember.cs

                            //---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// 
// @owner  [....], [....]
//--------------------------------------------------------------------- 
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
    }
} 

// 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.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
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK