private void AddCodeRule(string regName, Type regType, BasePlugInAttribute attribute)
 {
     RuleAttribute attr = attribute.Convert<RuleAttribute>();
     if (string.IsNullOrEmpty(attr.RegName))
         attr.RegName = attr.GetRegName(regType);
     WeixinToolkitSettings.Current.Engine.Add(attr);
 }
        private void AddCodeRule(string regName, Type regType, BasePlugInAttribute attribute)
        {
            RuleAttribute attr = attribute.Convert <RuleAttribute>();

            if (string.IsNullOrEmpty(attr.RegName))
            {
                attr.RegName = attr.GetRegName(regType);
            }
            WeixinToolkitSettings.Current.Engine.Add(attr);
        }
        protected override bool Add(string regName, BasePlugInAttribute attribute, Type type)
        {
            bool result = base.Add(regName, attribute, type);

            if (result)
            {
                ControlHtmlAttribute attr = attribute.Convert <ControlHtmlAttribute>();
                fDictionary.Add(regName, Tuple.Create(attr.SearchControl, attr.RangeControl));
            }
            return(result);
        }
Example #4
0
        internal XmlPlugInInfo(string regName, Type type, BasePlugInAttribute attr)
            : base(regName, attr)
        {
            FileName = PlugInFactoryInfo.GetFileName(type);
            TypeName = type.ToString();
            var objAttr = attr.Convert <BaseObjectElementAttribute>();

            NamingRule     = objAttr.NamingRule;
            NamespaceType  = objAttr.NamespaceType;
            NamespaceUri   = objAttr.NamespaceUri;
            UseConstructor = objAttr.UseConstructor;
        }
Example #5
0
        protected override bool Add(string regName, BasePlugInAttribute attribute, Type type)
        {
            bool result = base.Add(regName, attribute, type);

            if ((result))
            {
                PageTemplateAttribute attr = attribute.Convert <PageTemplateAttribute>();
                if (!string.IsNullOrEmpty(attr.DefaultModelCreator))
                {
                    fDefault.Add(regName, attr.DefaultModelCreator);
                }
            }
            return(result);
        }
Example #6
0
 public EnumCodeRegItem(string regName, BasePlugInAttribute attribute, Type regType)
     : base(regName, attribute, regType)
 {
     fAttribute         = attribute.Convert <EnumCodeTableAttribute>();
     fAttribute.RegName = regName;
 }