zoukankan      html  css  js  c++  java
  • LCLFramework框架之数据门户

    LCLFramework框架之数据门户职责


    1. 形成统一的数据访问方式。

    LCLFramework框架之数据门户设计


    数据门户分为客户端/服务端。
     
     LCLFramework框架之数据门户设计代码

    数据门户交互实现:

        1:WcfPortal
        2:WebServicePortal
     
       /// <summary>
        /// 数据访问层执行的地点
        /// </summary>
        public enum DataPortalLocation
        {
            /// <summary>
            /// 根据 LCLEnvironment.Location 而判断是否在远程服务端执行。
            ///
            /// 此种状态下,目前只有 LCLLocation.WPFClient 的位置时,才会选择在远程服务器执行。20130118
            /// </summary>
            Dynamic,
            /// <summary>
            /// 将在当前机器执行。
            /// </summary>
            Local,
        }
    public interface IDataPortalServer
     {
            DataPortalResult Action(Type objectType, string methodName, object criteria, DataPortalContext context);
      }
        /// <summary>
        /// 最终调用实体的 IDataPortalServer 门户实现。
        /// </summary>
        public class LCLDataPortal : IDataPortalServer
        {
            public DataPortalResult Action(Type objectType, string methodName, object criteria, DataPortalContext context)
            {
                var obj = RF.Find(objectType);
                //通过反射 调用
                var res = MethodCaller.CallMethodIfImplemented(obj, methodName, criteria);
                if (res != null)
                    return new DataPortalResult(res);
                else
                    return new DataPortalResult(obj);
            }
        }
  • 相关阅读:
    [leetcode]Insert Interval @ Python
    [leetcode]Merge Intervals @ Python
    [leetcode]Maximum Subarray @ Python
    [leetcode]Jump Game II @ Python
    [leetcode]Jump Game @ Python
    [leetcode]Wildcard Matching @ Python
    tomcat 配置https 外部链接显示证书不安全 原因找到为其他地方的链接用的ip地址,证书是发给域名的所以报错
    netstat -tanp ss -lntup |grep
    https://www.pstips.net/ powershell
    awk之getline()函数运用
  • 原文地址:https://www.cnblogs.com/luomingui/p/5832541.html
Copyright © 2011-2022 走看看