System.AppDomainSetup.AppDomainSetup.GetAppBase C# (CSharp) Method

GetAppBase() static private method

static private GetAppBase ( string appBase ) : string
appBase string
return string
		static string GetAppBase (string appBase)
		{
			if (appBase == null)
				return null;

			int len = appBase.Length;
			if (len >= 8 && appBase.ToLower ().StartsWith ("file://")) {
				appBase = appBase.Substring (7);
				if (Path.DirectorySeparatorChar != '/')
					appBase = appBase.Replace ('/', Path.DirectorySeparatorChar);
				if (Environment.IsRunningOnWindows) {
					// Under Windows prepend "//" to indicate it's a local file
					appBase = "//" + appBase;
				}
			} else {
				appBase = Path.GetFullPath (appBase);
			}

			return appBase;
		}