protected IReportInstanceManageDetail this[string key]
 {
     get
     {
         if (InterfaceInstanceList.ContainsKey(key))
         {
             return(InterfaceInstanceList[key]);
         }
         else
         {
             List <InterfaceInstance> interfaces  = InterfaceInstanceOperator.Instance.LoadListByName("IReportInstanceManageDetail");
             InterfaceInstance        newInstance = interfaces.Find(I => I.InterfaceInstanceName == key);
             if (newInstance != null)
             {
                 IReportInstanceManageDetail _interface = ReportInstanceManageDetailBuilder.Instance.DoBuild(newInstance.Reference);
                 if (_interface != null)
                 {
                     AddHandle(newInstance.InterfaceInstanceName, _interface);
                     return(_interface);
                 }
             }
         }
         return(DefaultHandle);
     }
 }
 protected void AddHandle(string InstanceName, IReportInstanceManageDetail interfaceInstance)
 {
     if (!InterfaceInstanceList.ContainsKey(InstanceName))
     {
         InterfaceInstanceList.Add(InstanceName, interfaceInstance);
     }
     else
     {
         InterfaceInstanceList[InstanceName] = interfaceInstance;
     }
 }
        public ReportInstanceManageDetailEngine()
        {
            //注册
            AddHandle("*", new DefaultReportInstanceManageDetail());
            //AddHandle("ProRptDetail", new ReportInstanceProDetail());
            //AddHandle("GroupRptDetail", new ReportInstanceGroupDetail());
            //AddHandle("DirectlyRptDetail", new ReportInstanceDirectlyDetail());
            List <InterfaceInstance> interfaces = InterfaceInstanceOperator.Instance.LoadListByName("IReportInstanceManageDetail");

            //注册扩展服务
            foreach (InterfaceInstance info in interfaces)
            {
                //根据InterfaceInstanceName,实现不同的处理方法
                IReportInstanceManageDetail _interface = ReportInstanceManageDetailBuilder.Instance.DoBuild(info.Reference);
                if (_interface != null)
                {
                    AddHandle(info.InterfaceInstanceName, _interface);
                }
            }
        }