DesignerDataTable.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / CompMod / System / ComponentModel / Design / Data / DesignerDataTable.cs / 1 / DesignerDataTable.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.ComponentModel.Design.Data { 
 
    using System;
    using System.Collections; 

    /// 
    /// Represents a single table in a data connection. A collection of this
    /// type is returned from IDesignerDataSchema.GetSchemaItems when it is 
    /// passed DesignerDataSchemaClass.Tables.
    ///  
    public abstract class DesignerDataTable : DesignerDataTableBase { 

        private ICollection _relationships; 

        /// 
        /// 
        protected DesignerDataTable(string name) : base(name) { 
        }
 
        ///  
        /// 
        protected DesignerDataTable(string name, string owner) : base(name, owner) { 
        }

        /// 
        /// The collection of relationships in the table. 
        /// 
        public ICollection Relationships { 
            get { 
                if (_relationships == null) {
                    _relationships = CreateRelationships(); 
                }
                return _relationships;
            }
        } 

        ///  
        /// This method will be called the first time the Relationships 
        /// property is accessed. It should return a collection of
        /// DesignerDataRelationship objects representing this table's 
        /// columns.
        /// 
        protected abstract ICollection CreateRelationships();
    } 
}
 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

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