- UID
- 104223
- 积分
- 124
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2003-12-20
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
刚从一个朋友那里拿到了AutoCAD 2008中有关.NET 开发的4个dll文件,大致看了一下。发现新增加了一个命名空间:Autodesk.AutoCAD.ComponentModel,应该是有关自定义实体的.
下面是这个命名空间中的类:
namespace Autodesk.AutoCAD.ComponentModel
{
public interface IPropertyProvider
{
// Methods
PropertyDescriptorCollection GetProperties(object instance);
}
public interface ITypeDescriptor
{
// Methods
void AddPerInstancePropertyProvider(IPropertyProvider pp);
void AddProperty(PropertyDescriptor prop);
ReadOnlyCollection<IPropertyProvider> GetPerInstancePropertyProviders();
PropertyDescriptorCollection ModifyPropertyCollection(PropertyDescriptorCollection defaultProps, object instance);
void RemovePerInstancePropertyProvider(IPropertyProvider pp);
void RemoveProperty(PropertyDescriptor prop);
// Properties
bool HasPerInstancePropertyProviders { get; }
}
public abstract class PropertyDescriptorBase<TComponent, TPropertyValue> : PropertyDescriptor
{
// Methods
public PropertyDescriptorBase(string name);
public PropertyDescriptorBase(string name, Attribute[] att);
public override bool CanResetValue(object component);
public override void ResetValue(object component);
public override bool ShouldSerializeValue(object component);
// Properties
public override Type ComponentType { get; }
public override string DisplayName { get; }
public override bool IsReadOnly { get; }
public override Type PropertyType { get; }
}
[AttributeUsage(4)]
public class PropertyProviderAttribute : Attribute
{
// Methods
public PropertyProviderAttribute(Type type);
// Properties
public Type PropertyProviderType { get; }
}
public class TypeDescriptionProvider<T> : TypeDescriptionProvider
{
// Methods
public TypeDescriptionProvider();
public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance);
}
public class TypeDescriptor : ITypeDescriptor
{
// Methods
public TypeDescriptor(Type type);
public void AddPerInstancePropertyProvider(IPropertyProvider pp);
public void AddProperty(PropertyDescriptor prop);
public ReadOnlyCollection<IPropertyProvider> GetPerInstancePropertyProviders();
public PropertyDescriptorCollection ModifyPropertyCollection(PropertyDescriptorCollection defaultProps, object instance);
public void RemovePerInstancePropertyProvider(IPropertyProvider pp);
public void RemoveProperty(PropertyDescriptor prop);
// Properties
public bool HasPerInstancePropertyProviders { get; }
}
public class TypeManager
{
// Properties
public static TypeManager Instance { get; }
public ITypeDescriptor this[Type type] { get; }
}
} |
|