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); }
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); }
private void FormatStrAttr(PlatFormInfo platform, AuthNode node, string attrName) { var attrValue = ReflectionOptimizer.GetProperty <PlatFormInfo, string>(platform, attrName); ReflectionOptimizer.SetProperty <AuthNode, string>(node, attrValue, attrName); }