コード例 #1
0
		public SimpleApplicationHost(VirtualPath virtualPath, string physicalPath)
		{
			if(StringUtil.IsNullOrEmpty(physicalPath))
				throw new ArgumentException("physicalPath");

			_appVirtualPath = virtualPath;
			_appPhysicalPath = physicalPath.EndsWith(@"\") ? physicalPath : (physicalPath + @"\");
		}
コード例 #2
0
		internal ObjectHandle CreateInstanceInNewWorkerAppDomain(Type type, string appId, VirtualPath virtualPath, string physicalPath)
		{
			IApplicationHost appHost = new SimpleApplicationHost(virtualPath, physicalPath);
            HostingEnvironmentParameters hostingParameters = new HostingEnvironmentParameters();
            hostingParameters.HostingFlags = HostingEnvironmentFlags.HideFromAppManager;
            return CreateAppDomainWithHostingEnvironmentAndReportErrors(appId, appHost, hostingParameters).CreateInstance(type);
		}
コード例 #3
0
		private static void PopulateDomainBindings(string domainId, string appId, string appName, string appPath, VirtualPath appVPath, AppDomainSetup setup, IDictionary dict)
		{
			//setup.ShadowCopyFiles = "true";
			setup.ApplicationBase = appPath;
            if (Directory.Exists(Path.Combine(appPath, "bin")))
            {
                setup.PrivateBinPath = "bin";
                setup.PrivateBinPathProbe = "*";
            }
            setup.ApplicationName = appName;
			setup.ConfigurationFile = "Web.config";
			setup.DisallowCodeDownload = true;
			dict.Add(".appDomain", "*");
			dict.Add(".appId", appId);
			dict.Add(".appPath", appPath);
			dict.Add(".appVPath", appVPath.VirtualPathString);
			dict.Add(".domainId", domainId);
		}
コード例 #4
0
 private static string CreateSimpleAppId(VirtualPath virtualPath, string physicalPath, string siteName)
 {
     string str = virtualPath.VirtualPathString + physicalPath;
     if (!string.IsNullOrEmpty(siteName))
         str = str + siteName;
     return str.GetHashCode().ToString("x", CultureInfo.InvariantCulture);
 }
コード例 #5
0
		internal void Initialize(ApplicationManager appManager, IApplicationHost appHost)
		{
			_appManager = appManager;
			_appId = FluorineRuntime.AppDomainAppIdInternal;
			_appVirtualPath = FluorineRuntime.AppDomainAppVirtualPathObject;
			_appPhysicalPath = FluorineRuntime.AppDomainAppPathInternal;
			_appHost = appHost;
			_initiateShutdownWorkItemCallback = new WaitCallback(InitiateShutdownWorkItemCallback);
		}
コード例 #6
0
ファイル: ApplicationInfo.cs プロジェクト: apakian/fluorinefx
 internal ApplicationInfo(string id, VirtualPath virtualPath, string physicalPath)
 {
     _id = id;
     _virtualPath = virtualPath;
     _physicalPath = physicalPath;
 }
コード例 #7
0
		private void Init()
		{
			try
			{
				if (GetAppDomainString(".appDomain") != null)
				{
					_appDomainAppId = GetAppDomainString(".appId");
					_appDomainAppPath = GetAppDomainString(".appPath");
					_appDomainAppVPath = VirtualPath.CreateNonRelativeTrailingSlash(GetAppDomainString(".appVPath"));
					_appDomainId = GetAppDomainString(".domainId");
                    _appDomainUnloadallback = new WaitCallback(ReleaseResourcesAndUnloadAppDomain);
				}
			}
			catch (Exception exception)
			{
				if(_log != null && _log.IsFatalEnabled )
					_log.Fatal(exception.Message, exception);
			}
		}