using System.Web.UI; using System.Web.UI.Design; using System.ComponentModel; using System.Reflection; namespace Csla.Web.Design { /// /// Object providing access to schema information for /// a business object. /// /// /// This object returns only one view, which corresponds /// to the business object used by data binding. /// public class ObjectSchema : IDataSourceSchema { private string _typeName = ""; private CslaDataSourceDesigner _designer; /// /// Creates an instance of the object. /// /// Data source designer object. /// Type name for /// which the schema should be generated. public ObjectSchema(CslaDataSourceDesigner designer, string typeName) { _typeName = typeName; _designer = designer; } /// /// Returns a single element array containing the /// schema for the CSLA .NET business object. /// public System.Web.UI.Design.IDataSourceViewSchema[] GetViews() { IDataSourceViewSchema[] result = null; result = new IDataSourceViewSchema[] { new ObjectViewSchema(_designer, _typeName) }; return result; } } }