Ejemplo n.º 1
0
        private void FormatStrAttr(PlatFormInfo platform, AuthenticationInfo auth, AuthNode node, string attrName)
        {
            var attrValue = ReflectionOptimizer.GetProperty <AuthenticationInfo, string>(auth, attrName);

            if (string.IsNullOrEmpty(attrValue))
            {
                attrValue = ReflectionOptimizer.GetProperty <PlatFormInfo, string>(platform, attrName);
            }
            ReflectionOptimizer.SetProperty <AuthNode, string>(node, attrValue, attrName);
        }
Ejemplo n.º 2
0
        private void FormatBoolAttr(PlatFormInfo platform, AuthNode node, string attrName)
        {
            bool value;

            if (!string.IsNullOrEmpty(node.PlatformName) && AppSettingCache.Instance.ContainerKey(node.PlatformName) && string.Compare(attrName, AppSettingCache.Instance[node.PlatformName]) == 0)
            {
                value = true;
            }
            else
            {
                var attrValue = ReflectionOptimizer.GetProperty <PlatFormInfo, string>(platform, attrName);
                value = Convert.ToBoolean(int.Parse(attrValue));
            }
            ReflectionOptimizer.SetProperty <AuthNode, bool>(node, value, attrName);
        }
Ejemplo n.º 3
0
        private void FormatStrAttr(PlatFormInfo platform, AuthNode node, string attrName)
        {
            var attrValue = ReflectionOptimizer.GetProperty <PlatFormInfo, string>(platform, attrName);

            ReflectionOptimizer.SetProperty <AuthNode, string>(node, attrValue, attrName);
        }