9using System.Collections;
10using System.Collections.Generic;
11using System.Web.UI.Design;
12using System.ComponentModel;
13using System.ComponentModel.Design;
27 private string _typeName =
"";
49 public System.Web.UI.Design.IDataSourceViewSchema[]
GetChildren()
64 public System.Web.UI.Design.IDataSourceFieldSchema[]
GetFields()
66 ITypeResolutionService typeService =
null;
67 List<ObjectFieldInfo> result =
new List<ObjectFieldInfo>();
69 if (_designer !=
null)
71 Type objectType =
null;
74 typeService = (ITypeResolutionService)(_designer.Site.GetService(typeof(ITypeResolutionService)));
75 objectType = typeService.GetType(_typeName,
true,
false);
77 if (typeof(IEnumerable).IsAssignableFrom(objectType))
80 objectType = Utilities.GetChildItemType(objectType);
82 PropertyDescriptorCollection props = TypeDescriptor.GetProperties(objectType);
83 foreach (PropertyDescriptor item
in props)
95 return result.ToArray();
Implements designer support for CslaDataSource.
Contains schema information for a single object property.
Object providing schema information for a business object.
System.Web.UI.Design.IDataSourceFieldSchema[] GetFields()
Returns schema information for each property on the object.
System.Web.UI.Design.IDataSourceViewSchema[] GetChildren()
Returns a list of child schemas belonging to the object.
string Name
Returns the name of the schema.
ObjectViewSchema(CslaDataSourceDesigner site, string typeName)
Create an instance of the object.
@ Serializable
Prevents updating or inserting until the transaction is complete.