ContextConfiguration.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / DynamicData / DynamicData / ContextConfiguration.cs / 1305376 / ContextConfiguration.cs

                            using System.Collections.Generic; 
using System.Security.Permissions;
using System.Diagnostics.CodeAnalysis;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel; 
using System.Web.DynamicData.ModelProviders;
 
namespace System.Web.DynamicData { 
    /// 
    /// Allows for providing extra config information to a context 
    /// 
    public class ContextConfiguration {
        /// 
        /// An optional factory for obtaining a metadata source for a given entity type 
        /// 
        public Func MetadataProviderFactory { get; set; } 
 
        /// 
        /// scaffold all tables 
        /// 
        public bool ScaffoldAllTables { get; set; }

        ///  
        /// ctor
        ///  
        [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "This can be set by the user to support inline dictionary intializers")] 
        public ContextConfiguration() {
            MetadataProviderFactory = type => new AssociatedMetadataTypeTypeDescriptionProvider(type); 
        }
    }
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
´╗┐using System.Collections.Generic; 
using System.Security.Permissions;
using System.Diagnostics.CodeAnalysis;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel; 
using System.Web.DynamicData.ModelProviders;
 
namespace System.Web.DynamicData { 
    /// 
    /// Allows for providing extra config information to a context 
    /// 
    public class ContextConfiguration {
        /// 
        /// An optional factory for obtaining a metadata source for a given entity type 
        /// 
        public Func MetadataProviderFactory { get; set; } 
 
        /// 
        /// scaffold all tables 
        /// 
        public bool ScaffoldAllTables { get; set; }

        ///  
        /// ctor
        ///  
        [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "This can be set by the user to support inline dictionary intializers")] 
        public ContextConfiguration() {
            MetadataProviderFactory = type => new AssociatedMetadataTypeTypeDescriptionProvider(type); 
        }
    }
}

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