public static void InitApplication(XtallAppInfo appInfo) { var info = new AppInfo(appInfo); InitializationLock.EnterWriteLock(); try { Applications[info.VirtualPath] = info; } finally { InitializationLock.ExitWriteLock(); } }
public AppInfo(XtallAppInfo info) : this() { if (info == null) throw new ArgumentNullException("info"); if (info.VirtualPath == null) throw new ArgumentNullException("info.VirtualPath"); if (info.AssetPath == null) throw new ArgumentNullException("info.AssetPath"); VirtualPath = info.VirtualPath.TrimEnd('/').ToLower(); AssetPath = info.AssetPath; CachePath = info.CachePath; SetupName = info.SetupName ?? "setup"; InstalledDisplayName = info.InstalledDisplayName; RunInfo = info.RunInfo; ReturnUrlSelector = info.ReturnUrlSelector ?? ((r, p) => p); ParameterSelector = info.ParameterSelector ?? ((r, p) => p); }