Esempio n. 1
0
        internal static void Start()
        {
            bool enableWebClientModuleManagement = Core.Cmn.ConfigHelper.GetConfigValue <bool>("EnableWebClientModuleManagement");

            if (enableWebClientModuleManagement)
            {
                StartupProjectConfig.DllName = AppBase.StartupProject.GetName().Name; //Core.Cmn.ConfigHelper.GetConfigValue<string>("StartupProjectForWebClient");
                                                                                      // _currentProject = new Project(AppDomain.CurrentDomain.BaseDirectory + "\\" + StartupProjectConfig.DllName + ".csproj");


                _webClientModuleManagementValue = Core.Cmn.ConfigHelper.GetConfigValue <string>("WebClientModuleManagement");
                _resourceInfoList         = new List <ResourceInfo>();
                _conflictResourceInfoList = new List <ResourceInfo>();


                SetGlobalConfiguration(AppBase.StartupProject);


                var pathesInfo = _webClientModuleManagementValue.Split(';');
                foreach (var item in pathesInfo)
                {
                    if (String.IsNullOrEmpty(item))
                    {
                        continue;
                    }

                    var path = item.Split(',');

                    var projectSpec = new SubProjectSpec(path[1].Trim(), path[0].Trim());

                    _subProjectList.Add(projectSpec);
                }


                var enableWebClientModuleManagementInDebugTime = StartupProjectConfig.Debug;
                //#if !DEBUG
                if (!enableWebClientModuleManagementInDebugTime)
                {
                    ServerSideWebClientManagementForReleaseTime(_bundles);
                    return;
                }
                //#endif


                //#if DEBUG

                //var enableWebClientModuleManagementInDebugTime = Core.Cmn.ConfigHelper.GetConfigValue<bool>("EnableWebClientModuleManagementInDebugTime");
                //((System.Web.Configuration.CompilationSection)(System.Configuration.ConfigurationManager.GetSection("system.web/compilation"))).Debug
                else
                //  if (enableWebClientModuleManagementInDebugTime)
                {
                    // WebClientManagementForDebugTime(configedPaths, allFiles);
                    WebClientManagementForDebugTime();
                }
                //#endif
            }
        }
Esempio n. 2
0
        public ResourceInfo(SubProjectSpec project, string fullPath)
        {
            var relativePath = fullPath.Replace(project.FullPath, "");

            DllName               = project.DLLName;
            CSProjFilePath        = $"{project.RelativeAreaPath}{relativePath}";
            SourceVersionFilePath = Path.GetFullPath(String.Concat(project.FullPath, "FilesVersionInfo.txt"));
            FullPath              = Path.GetFullPath(String.Concat(AppDomain.CurrentDomain.BaseDirectory, project.RelativeAreaPath, relativePath));
            SourcePath            = Path.GetFullPath(String.Concat(project.FullPath, relativePath));
        }