string GetUrl(MoonlightProjectConfiguration config) { if (!this.SilverlightApplication || config == null) { return(null); } string url = this.StartPageUrl; if (string.IsNullOrEmpty(url) && this.CreateTestPage) { string testPage = this.TestPageFileName; if (String.IsNullOrEmpty(testPage)) { testPage = "TestPage.html"; } url = Path.Combine(config.OutputDirectory, testPage); } if (!url.StartsWith("http://", StringComparison.OrdinalIgnoreCase) && !url.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) { url = "file://" + url.Replace(Path.PathSeparator, '/'); } return(url); }
public override SolutionItemConfiguration CreateConfiguration(string name) { var conf = new MoonlightProjectConfiguration(name); conf.CopyFrom(base.CreateConfiguration(name)); return(conf); }
ExecutionCommand CreateExecutionCommand (ConfigurationSelector solutionConfig, MoonlightProjectConfiguration configuration) { string url = GetUrl (configuration); if (url != null) { return new MoonlightExecutionCommand (this.Name, url) { UserAssemblyPaths = GetUserAssemblyPaths (solutionConfig) }; } return null; }
string GetUrl (MoonlightProjectConfiguration config) { if (!this.SilverlightApplication || config == null) return null; string url = this.StartPageUrl; if (string.IsNullOrEmpty (url) && this.CreateTestPage) { string testPage = this.TestPageFileName; if (String.IsNullOrEmpty (testPage)) testPage = "TestPage.html"; url = Path.Combine (config.OutputDirectory, testPage); } if (!url.StartsWith ("http://", StringComparison.OrdinalIgnoreCase) && !url.StartsWith ("https://", StringComparison.OrdinalIgnoreCase)) { url = "file://" + url.Replace (Path.PathSeparator, '/'); } return url; }
ExecutionCommand CreateExecutionCommand (ConfigurationSelector solutionConfig, MoonlightProjectConfiguration configuration) { string url = GetUrl (configuration); if (url != null) { return new MoonlightExecutionCommand (this.Name, url) { UserAssemblyPaths = GetUserAssemblyPaths (solutionConfig) }; } return null; }
public override SolutionItemConfiguration CreateConfiguration (string name) { var conf = new MoonlightProjectConfiguration (name); conf.CopyFrom (base.CreateConfiguration (name)); return conf; }