Ejemplo n.º 1
0
        public override void SetValue(object component, object value)
        {
            if (component == null)
            {
                throw new ArgumentNullException("component");
            }
            RuleSetReference reference = component as RuleSetReference;

            if (reference == null)
            {
                throw new ArgumentNullException("component");
            }
            RuleSet item = value as RuleSet;

            if (!string.IsNullOrEmpty(reference.RuleSetName))
            {
                ISite serviceProvider = PropertyDescriptorUtils.GetSite(base.ServiceProvider, component);
                if (serviceProvider == null)
                {
                    throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Messages.MissingService, new object[] { typeof(ISite).FullName }));
                }
                RuleSetCollection ruleSets    = null;
                RuleDefinitions   definitions = ConditionHelper.Load_Rules_DT(serviceProvider, Helpers.GetRootActivity(serviceProvider.Component as Activity));
                if (definitions != null)
                {
                    ruleSets = definitions.RuleSets;
                }
                if ((ruleSets != null) && ruleSets.Contains(reference.RuleSetName))
                {
                    ruleSets.Remove(reference.RuleSetName);
                    ruleSets.Add(item);
                    ConditionHelper.Flush_Rules_DT(serviceProvider, Helpers.GetRootActivity(serviceProvider.Component as Activity));
                }
            }
        }
        ICollection IPropertyValueProvider.GetPropertyValues(ITypeDescriptorContext context)
        {
            ArrayList list = new ArrayList();

            if ((string.Equals(context.PropertyDescriptor.Name, "Path", StringComparison.Ordinal) && !string.IsNullOrEmpty(this.Name)) && (context.PropertyDescriptor is ActivityBindPathPropertyDescriptor))
            {
                ITypeDescriptorContext outerPropertyContext = ((ActivityBindPathPropertyDescriptor)context.PropertyDescriptor).OuterPropertyContext;
                if (outerPropertyContext == null)
                {
                    return(list);
                }
                Activity component = PropertyDescriptorUtils.GetComponent(outerPropertyContext) as Activity;
                if (component == null)
                {
                    return(list);
                }
                Activity activity2 = Helpers.ParseActivityForBind(component, this.Name);
                if (activity2 == null)
                {
                    return(list);
                }
                foreach (MemberInfo info in ActivityBindPropertyDescriptor.GetBindableMembers(activity2, outerPropertyContext))
                {
                    list.Add(info.Name);
                }
            }
            return(list);
        }
Ejemplo n.º 3
0
        public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component,
                                                                   Attribute[] attributes)
        {
            var propsCollection = PropertyDescriptorUtils.GetAllProperties(context, component, attributes);

            return(PropertyDescriptorUtils.RemapComponent(propsCollection, component, component, null, null));
        }
Ejemplo n.º 4
0
        public void Start()
        {
            sourceProperty = PropertyDescriptorUtils.GetOne(sourceObject.GetType(), sourcePropertyName);
            targetProperty = PropertyDescriptorUtils.GetOne(targetObject.GetType(), targetPropertyName);

            canUpdate = sourceProperty != null && targetProperty != null && sourceProperty.Type == targetProperty.Type;
        }
        private void UpdateImplementingActivities()
        {
            ServiceOperationListItem         operationListItem          = this.Item as ServiceOperationListItem;
            WorkflowServiceOperationListItem workflowOperationListItem  = this.Item as WorkflowServiceOperationListItem;
            TypedServiceOperationListItem    reflectedOperationListItem = this.Item as TypedServiceOperationListItem;
            OperationInfoBase operation = null;

            if (workflowOperationListItem != null)
            {
                operation = workflowOperationListItem.Operation;
            }
            else if (reflectedOperationListItem != null)
            {
                operation = reflectedOperationListItem.Operation;
            }
            Fx.Assert(operation != null, "operation should not be null at this point");
            // workflow operations list item will complain if some operationInfo objects have different signature than others
            // for the same operation name. This will happen when we are updating the activities, since they already have  a operation
            // object for that operation name, but with a different signature. so make them all point to null first ,then update.
            if (workflowOperationListItem != null)
            {
                foreach (Activity activity in operationListItem.ImplementingActivities)
                {
                    PropertyDescriptorUtils.SetPropertyValue(this.ServiceProvider, ServiceOperationHelpers.GetServiceOperationInfoPropertyDescriptor(activity), activity, null);
                }
            }
            foreach (Activity activity in operationListItem.ImplementingActivities)
            {
                PropertyDescriptorUtils.SetPropertyValue(this.ServiceProvider, ServiceOperationHelpers.GetServiceOperationInfoPropertyDescriptor(activity), activity, operation.Clone());
            }
        }
Ejemplo n.º 6
0
        public override void SetValue(object component, object value)
        {
            if (component == null)
            {
                throw new ArgumentNullException("component");
            }
            RuleConditionReference reference = component as RuleConditionReference;

            if (reference == null)
            {
                throw new ArgumentNullException("component");
            }
            CodeExpression expression = value as CodeExpression;

            if (reference.ConditionName != null)
            {
                ISite serviceProvider = PropertyDescriptorUtils.GetSite(base.ServiceProvider, component);
                if (serviceProvider == null)
                {
                    throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Messages.MissingService, new object[] { typeof(ISite).FullName }));
                }
                RuleConditionCollection conditions  = null;
                RuleDefinitions         definitions = ConditionHelper.Load_Rules_DT(serviceProvider, Helpers.GetRootActivity(serviceProvider.Component as Activity));
                if (definitions != null)
                {
                    conditions = definitions.Conditions;
                }
                if ((conditions != null) && conditions.Contains(reference.ConditionName))
                {
                    RuleExpressionCondition condition = (RuleExpressionCondition)conditions[reference.ConditionName];
                    condition.Expression = expression;
                    ConditionHelper.Flush_Rules_DT(serviceProvider, Helpers.GetRootActivity(serviceProvider.Component as Activity));
                }
            }
        }
Ejemplo n.º 7
0
        private PropertyDescriptorCollection ReadProperties(ITypeDescriptorContext context, object realComponent, Attribute[] attributes, object realObject, string name)
        {
            PropertyDescriptorCollection remappedProperties;
            PropertyDescriptorCollection realProperties = PropertyDescriptorUtils.GetAllProperties(context, realObject, attributes);

            remappedProperties = PropertyDescriptorUtils.RemapComponent(realProperties, realComponent, realObject, name, new ChildTypeConverter());
            return(remappedProperties);
        }
        public override void SetValue(object component, object value)
        {
            if (component == null)
            {
                throw new ArgumentNullException("component");
            }

            RuleConditionReference conditionDecl = component as RuleConditionReference;

            if (conditionDecl == null)
            {
                throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Messages.NotARuleConditionReference, "component"), "component");
            }

            string conditionName = value as string;

            if ((conditionName == null) || (conditionName.TrimEnd().Length == 0))
            {
                conditionName = string.Empty;
            }

            ISite site = PropertyDescriptorUtils.GetSite(this.ServiceProvider, component);

            if (site == null)
            {
                string message = string.Format(CultureInfo.CurrentCulture, Messages.MissingService, typeof(ISite).FullName);
                throw new InvalidOperationException(message);
            }

            RuleConditionCollection conditionDefinitions = null;
            RuleDefinitions         rules = ConditionHelper.Load_Rules_DT(site, Helpers.GetRootActivity(site.Component as Activity));

            if (rules != null)
            {
                conditionDefinitions = rules.Conditions;
            }

            if (conditionDefinitions != null && conditionName.Length != 0 && !conditionDefinitions.Contains(conditionName))
            {
                //in this case, RuleExpressionCondition is the only type allowed in the ruleConditionCollection
                RuleExpressionCondition newCondition = new RuleExpressionCondition();
                newCondition.Name = conditionName;
                conditionDefinitions.Add(newCondition);
                ConditionHelper.Flush_Rules_DT(site, Helpers.GetRootActivity(site.Component as Activity));
            }

            // Cause component change events to be fired.
            PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(component)["ConditionName"];

            if (propertyDescriptor != null)
            {
                PropertyDescriptorUtils.SetPropertyValue(site, propertyDescriptor, component, conditionName);
            }
        }
Ejemplo n.º 9
0
        public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component,
                                                                   Attribute[] attributes)
        {
            var eventConverter = component as EventInfoConverter;

            if (eventConverter != null)
            {
                return(eventConverter.GetProperties());
            }
            return(PropertyDescriptorUtils.GetInstanceEvents(component));
        }
Ejemplo n.º 10
0
 private void UpdateImplementingActivities(ServiceContractListItem listItem)
 {
     foreach (WorkflowServiceOperationListItem workflowOperationListItem in listItem.Operations)
     {
         Fx.Assert(workflowOperationListItem != null, "Operations inside an editable contract should only be workflow first operations");
         workflowOperationListItem.Operation.ContractName = listItem.Name;
         // update the activities implementing the operation too
         foreach (Activity activity in workflowOperationListItem.ImplementingActivities)
         {
             PropertyDescriptorUtils.SetPropertyValue(this.ServiceProvider, ServiceOperationHelpers.GetServiceOperationInfoPropertyDescriptor(activity), activity, workflowOperationListItem.Operation.Clone());
         }
     }
 }
Ejemplo n.º 11
0
        public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
        {
            ISite      serviceProvider = null;
            IComponent component       = PropertyDescriptorUtils.GetComponent(context);

            if (component != null)
            {
                serviceProvider = component.Site;
            }
            PropertyDescriptorCollection descriptors = new PropertyDescriptorCollection(null);

            descriptors.Add(new RuleSetPropertyDescriptor(serviceProvider, TypeDescriptor.CreateProperty(typeof(RuleSet), "RuleSet Definition", typeof(RuleSet), new Attribute[] { new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content), DesignOnlyAttribute.Yes })));
            return(descriptors);
        }
Ejemplo n.º 12
0
        protected override void OnMouseDoubleClick(System.Windows.Forms.MouseEventArgs e)
        {
            // Do not allow editing if activity is locked
            if (this.IsLocked)
            {
                return;
            }

            OperationInfoBase pickedServiceOperation = null;

            if (ServiceOperationUIEditor.TryPickOperation(this.Activity.Site, this.Activity, this.SendActivity.ServiceOperationInfo, out pickedServiceOperation))
            {
                PropertyDescriptorUtils.SetPropertyValue(this.Activity.Site, ServiceOperationHelpers.GetServiceOperationInfoPropertyDescriptor(this.Activity), this.Activity, pickedServiceOperation);
            }
        }
Ejemplo n.º 13
0
        public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component,
                                                                   Attribute[] attributes)
        {
            if (context.PropertyDescriptor is RemapPropertyDescriptor)
            {
                var remapDescriptor = context.PropertyDescriptor as RemapPropertyDescriptor;
                if (remapDescriptor.Name == "CurrentApplication")
                {
                    var realProperties     = PropertyDescriptorUtils.GetStaticProperties(typeof(Application));
                    var remappedProperties = PropertyDescriptorUtils.RemapComponent(realProperties, component, null,
                                                                                    null, new ChildTypeConverter());
                    return(remappedProperties);
                }
                else
                {
                    var realProperties = ReadProperties(null, component, attributes, component, null);
                    return(realProperties);
                }
            }
            if (_cachedComponentInfo != component)
            {
                _cachedApplicationInfo = new ApplicationInfo();
                _cachedComponentInfo   = component;
            }

            var result = ReadProperties(context, component, attributes, _cachedApplicationInfo, null);

            //PropertyDescriptorCollection appProps = PropertyDescriptorUtils.GetStaticProperties(typeof(Application));
            //result = PropertyDescriptorUtils.MergeProperties(result, appProps);

            return(result);

            //temp = ReadProperties(context, component, attributes, cachedApplicationInfo.CurrentPrincipal, "CurrentPrincipal");
            //result = PropertyDescriptorUtils.MergeProperties(result, temp);

            //temp = ReadProperties(context, component, attributes, cachedApplicationInfo.CurrentPrincipal.Identity, "CurrentIdentity");
            //result = PropertyDescriptorUtils.MergeProperties(result, temp);

            //temp = ReadProperties(context, component, attributes, cachedApplicationInfo.CurrentPrincipal, "CurrentPrincipal");
            //result = PropertyDescriptorUtils.MergeProperties(result, temp);

            //temp = ReadProperties(context, component, attributes, cachedApplicationInfo.CurrentThread, "CurrentThread");
            //result = PropertyDescriptorUtils.MergeProperties(result, temp);

            //temp = ReadProperties(context, component, attributes, cachedApplicationInfo.CurrentProcess, "CurrentProcess");
            //result = PropertyDescriptorUtils.MergeProperties(result, temp);
        }
Ejemplo n.º 14
0
            static PerRequestHandler()
            {
                allProperties = PropertyDescriptorUtils.GetAll(
                    typeof(Person),
                    ShouldExpandSequence,
                    bindingFlags
                    )
                                .Where(IsValid)
                                .ToList();

                lowerCaseNameToProperty = allProperties.ToDictionary(
                    p => p.Name.ToLowerInvariant(),
                    p => p
                    );

                allPropertiesNames = allProperties.Select(p => p.Name).Join("\n");
            }
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object valueToConvert)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            string ruleSetName = valueToConvert as string;

            if ((ruleSetName == null) || (ruleSetName.TrimEnd().Length == 0))
            {
                ruleSetName = string.Empty;
            }

            ISite site = PropertyDescriptorUtils.GetSite(context, context.Instance);

            if (site == null)
            {
                string message = string.Format(CultureInfo.CurrentCulture, Messages.MissingService, typeof(ISite).FullName);
                throw new InvalidOperationException(message);
            }

            RuleSetCollection ruleSetCollection = null;
            RuleDefinitions   rules             = ConditionHelper.Load_Rules_DT(site, Helpers.GetRootActivity(site.Component as Activity));

            if (rules != null)
            {
                ruleSetCollection = rules.RuleSets;
            }

            if (ruleSetCollection != null && ruleSetName.Length != 0 && !ruleSetCollection.Contains(ruleSetName))
            {
                //in this case, RuleExpressionCondition is the only type allowed in the ruleConditionCollection
                RuleSet newRuleSet = new RuleSet();
                newRuleSet.Name = ruleSetName;
                ruleSetCollection.Add(newRuleSet);
                ConditionHelper.Flush_Rules_DT(site, Helpers.GetRootActivity(site.Component as Activity));
            }

            RuleSetReference ruleSetReference = new RuleSetReference();

            ruleSetReference.RuleSetName = ruleSetName;

            return(ruleSetReference);
        }
Ejemplo n.º 16
0
        public override void SetValue(object component, object value)
        {
            if (component == null)
            {
                throw new ArgumentNullException("component");
            }
            if (!(component is RuleConditionReference))
            {
                throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Messages.NotARuleConditionReference, new object[] { "component" }), "component");
            }
            string key = value as string;

            if ((key == null) || (key.TrimEnd(new char[0]).Length == 0))
            {
                key = string.Empty;
            }
            ISite serviceProvider = PropertyDescriptorUtils.GetSite(base.ServiceProvider, component);

            if (serviceProvider == null)
            {
                throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Messages.MissingService, new object[] { typeof(ISite).FullName }));
            }
            RuleConditionCollection conditions  = null;
            RuleDefinitions         definitions = ConditionHelper.Load_Rules_DT(serviceProvider, Helpers.GetRootActivity(serviceProvider.Component as Activity));

            if (definitions != null)
            {
                conditions = definitions.Conditions;
            }
            if (((conditions != null) && (key.Length != 0)) && !conditions.Contains(key))
            {
                RuleExpressionCondition item = new RuleExpressionCondition {
                    Name = key
                };
                conditions.Add(item);
                ConditionHelper.Flush_Rules_DT(serviceProvider, Helpers.GetRootActivity(serviceProvider.Component as Activity));
            }
            PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(component)["ConditionName"];

            if (propertyDescriptor != null)
            {
                PropertyDescriptorUtils.SetPropertyValue(serviceProvider, propertyDescriptor, component, key);
            }
        }
        protected override void OnActivityChanged(ActivityChangedEventArgs e)
        {
            base.OnActivityChanged(e);

            if (e.Member != null)
            {
                if (e.Member.Name == "ProxyClass")
                {
                    if (Activity.Site != null)
                    {
                        InvokeWebServiceActivity invokeWebServiceDecl = e.Activity as InvokeWebServiceActivity;
                        PropertyDescriptorUtils.SetPropertyValue(Activity.Site, TypeDescriptor.GetProperties(Activity)["MethodName"], Activity, String.Empty);

                        IExtendedUIService extUIService = (IExtendedUIService)Activity.Site.GetService(typeof(IExtendedUIService));
                        if (extUIService == null)
                        {
                            throw new Exception(SR.GetString(SR.General_MissingService, typeof(IExtendedUIService).FullName));
                        }

                        if (invokeWebServiceDecl.ProxyClass == null)
                        {
                            this.url = null;
                        }
                        else
                        {
                            Uri uri = extUIService.GetUrlForProxyClass(invokeWebServiceDecl.ProxyClass);
                            this.url = (uri != null) ? uri.ToString() : string.Empty;
                        }
                    }
                }

                if ((e.Member.Name == "MethodName" || e.Member.Name == "TargetWorkflow") &&
                    e.Activity is InvokeWebServiceActivity)
                {
                    (e.Activity as InvokeWebServiceActivity).ParameterBindings.Clear();
                }

                if (e.Member.Name == "ProxyClass" || e.Member.Name == "MethodName")
                {
                    TypeDescriptor.Refresh(e.Activity);
                }
            }
        }
        public override void SetValue(object component, object value)
        {
            if (component == null)
            {
                throw new ArgumentNullException("component");
            }

            RuleConditionReference conditionDecl = component as RuleConditionReference;

            if (conditionDecl == null)
            {
                throw new ArgumentNullException("component");
            }

            CodeExpression expression = value as CodeExpression;

            if (conditionDecl.ConditionName != null)
            {
                ISite site = PropertyDescriptorUtils.GetSite(this.ServiceProvider, component);
                if (site == null)
                {
                    string message = string.Format(CultureInfo.CurrentCulture, Messages.MissingService, typeof(ISite).FullName);
                    throw new InvalidOperationException(message);
                }

                RuleConditionCollection conditionDefs = null;
                RuleDefinitions         rules         = ConditionHelper.Load_Rules_DT(site, Helpers.GetRootActivity(site.Component as Activity));
                if (rules != null)
                {
                    conditionDefs = rules.Conditions;
                }

                if (conditionDefs != null && conditionDefs.Contains(conditionDecl.ConditionName))
                {
                    //in this case, RuleExpressionCondition is the only type allowed in the ruleConditionCollection
                    RuleExpressionCondition conditionDefinition = (RuleExpressionCondition)conditionDefs[conditionDecl.ConditionName];
                    conditionDefinition.Expression = expression;
                    ConditionHelper.Flush_Rules_DT(site, Helpers.GetRootActivity(site.Component as Activity));
                }
            }
        }
Ejemplo n.º 19
0
        public IDependencyManager BuildUp(object instance)
        {
            if (instance == null)
            {
                throw new NullReferenceException("tried to BuildUp null instance");
            }
            var members = PropertyDescriptorUtils.GetAll(
                instance.GetType(),
                BindingFlags.Instance |
                BindingFlags.Public | BindingFlags.NonPublic |
                BindingFlags.GetProperty | BindingFlags.SetProperty |
                BindingFlags.FlattenHierarchy
                ).Where(m => m.CanWrite && m.CanRead && m.IsDefined <DependencyAttribute>(true))
                          .OrderBy(p => p.GetCustomAttribute <DependencyAttribute>(true).Order);

            foreach (var member in members)
            {
                var dependencyAttribute = member.GetCustomAttribute <DependencyAttribute>(true);
                if (dependencyAttribute != null)
                {
                    if (dependencyAttribute.Register)
                    {
                        this.RegisterType(member.Type);
                    }
                }

                if (member.Read(instance) == null)
                {
                    var resolvedMemberValue = Resolve(member.Type);
                    member.Write(instance, resolvedMemberValue);
                }
            }

            if (instance is IOnDependenciesResolved)
            {
                (instance as IOnDependenciesResolved).OnDependenciesResolved();
            }

            return(this);
        }
        public override void SetValue(object component, object value)
        {
            if (component == null)
            {
                throw new ArgumentNullException("component");
            }

            RuleSetReference ruleSetReference = component as RuleSetReference;

            if (ruleSetReference == null)
            {
                throw new ArgumentNullException("component");
            }

            RuleSet ruleSet = value as RuleSet;

            if (!string.IsNullOrEmpty(ruleSetReference.RuleSetName))
            {
                ISite site = PropertyDescriptorUtils.GetSite(this.ServiceProvider, component);
                if (site == null)
                {
                    string message = string.Format(CultureInfo.CurrentCulture, Messages.MissingService, typeof(ISite).FullName);
                    throw new InvalidOperationException(message);
                }

                RuleSetCollection ruleSetCollection = null;
                RuleDefinitions   rules             = ConditionHelper.Load_Rules_DT(site, Helpers.GetRootActivity(site.Component as Activity));
                if (rules != null)
                {
                    ruleSetCollection = rules.RuleSets;
                }

                if (ruleSetCollection != null && ruleSetCollection.Contains(ruleSetReference.RuleSetName))
                {
                    ruleSetCollection.Remove(ruleSetReference.RuleSetName);
                    ruleSetCollection.Add(ruleSet);
                    ConditionHelper.Flush_Rules_DT(site, Helpers.GetRootActivity(site.Component as Activity));
                }
            }
        }
        protected override void OnActivityChanged(ActivityChangedEventArgs e)
        {
            base.OnActivityChanged(e);

            if (e.Member != null)
            {
                if (e.Member.Name == "InterfaceType")
                {
                    if (Activity.Site != null)
                    {
                        Type interfaceType = e.NewValue as Type;
                        if (interfaceType != null)
                        {
                            new ExternalDataExchangeInterfaceTypeFilterProvider(Activity.Site).CanFilterType(interfaceType, true);
                        }

                        CallExternalMethodActivity invokeActivity = e.Activity as CallExternalMethodActivity;
                        PropertyDescriptorUtils.SetPropertyValue(Activity.Site, TypeDescriptor.GetProperties(Activity)["MethodName"], Activity, String.Empty);

                        IExtendedUIService extUIService = (IExtendedUIService)Activity.Site.GetService(typeof(IExtendedUIService));
                        if (extUIService == null)
                        {
                            throw new Exception(SR.GetString(SR.General_MissingService, typeof(IExtendedUIService).FullName));
                        }
                    }
                }

                if ((e.Member.Name == "MethodName") &&
                    e.Activity is CallExternalMethodActivity)
                {
                    (e.Activity as CallExternalMethodActivity).ParameterBindings.Clear();
                }

                if (e.Member.Name == "InterfaceType" || e.Member.Name == "MethodName" || e.Member.Name == "CorrelationToken")
                {
                    TypeDescriptor.Refresh(e.Activity);
                }
            }
        }
Ejemplo n.º 22
0
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object valueToConvert)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            string key = valueToConvert as string;

            if ((key == null) || (key.TrimEnd(new char[0]).Length == 0))
            {
                key = string.Empty;
            }
            ISite serviceProvider = PropertyDescriptorUtils.GetSite(context, context.Instance);

            if (serviceProvider == null)
            {
                throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Messages.MissingService, new object[] { typeof(ISite).FullName }));
            }
            RuleSetCollection ruleSets    = null;
            RuleDefinitions   definitions = ConditionHelper.Load_Rules_DT(serviceProvider, Helpers.GetRootActivity(serviceProvider.Component as Activity));

            if (definitions != null)
            {
                ruleSets = definitions.RuleSets;
            }
            if (((ruleSets != null) && (key.Length != 0)) && !ruleSets.Contains(key))
            {
                RuleSet item = new RuleSet {
                    Name = key
                };
                ruleSets.Add(item);
                ConditionHelper.Flush_Rules_DT(serviceProvider, Helpers.GetRootActivity(serviceProvider.Component as Activity));
            }
            return(new RuleSetReference {
                RuleSetName = key
            });
        }
Ejemplo n.º 23
0
 public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value,
                                                            Attribute[] attributes)
 {
     //return method.GetChildProperties(null, null);
     return(PropertyDescriptorUtils.GetAllProperties(null, value, attributes));
 }