protected override void OnActivated() {
     base.OnActivated();
     IEnumerable<IModelClass> classInfoNodeWrappers = Application.Model.BOModel.Cast<IModelClassDescribeRunTimeMembers>().Where(
             wrapper => wrapper.DescribeRunTimeMembers).Cast<IModelClass>();
     foreach (var classInfoNodeWrapper in classInfoNodeWrappers) {
         TypeDescriptionProvider typeDescriptionProvider = TypeDescriptor.GetProvider(classInfoNodeWrapper.TypeInfo.Type);
         var membersTypeDescriptionProvider = new RuntimeMembersTypeDescriptionProvider(typeDescriptionProvider);
         TypeDescriptor.AddProvider(membersTypeDescriptionProvider, classInfoNodeWrapper.TypeInfo.Type);
     }
 }
 protected override void OnActivated()
 {
     base.OnActivated();
     IEnumerable<ClassInfoNodeWrapper> classInfoNodeWrappers =
         new ApplicationNodeWrapper(Application.Model).BOModel.Classes.Where(
             wrapper => wrapper.Node.GetAttributeBoolValue(DescribeRunTimeMembersAttributeName));
     foreach (var classInfoNodeWrapper in classInfoNodeWrappers) {
         TypeDescriptionProvider typeDescriptionProvider = TypeDescriptor.GetProvider(classInfoNodeWrapper.ClassTypeInfo.Type);
         var membersTypeDescriptionProvider = new RuntimeMembersTypeDescriptionProvider(typeDescriptionProvider);
         TypeDescriptor.AddProvider(membersTypeDescriptionProvider, classInfoNodeWrapper.ClassTypeInfo.Type);
     }
 }
Пример #3
0
        protected override void OnActivated()
        {
            base.OnActivated();
            IEnumerable <IModelClass> classInfoNodeWrappers = Application.Model.BOModel.Cast <IModelClassDescribeRunTimeMembers>().Where(
                wrapper => wrapper.DescribeRunTimeMembers).Cast <IModelClass>();

            foreach (var classInfoNodeWrapper in classInfoNodeWrappers)
            {
                TypeDescriptionProvider typeDescriptionProvider = TypeDescriptor.GetProvider(classInfoNodeWrapper.TypeInfo.Type);
                var membersTypeDescriptionProvider = new RuntimeMembersTypeDescriptionProvider(typeDescriptionProvider);
                TypeDescriptor.AddProvider(membersTypeDescriptionProvider, classInfoNodeWrapper.TypeInfo.Type);
            }
        }