Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public override SolutionItemConfiguration CreateConfiguration(string name)
        {
            var conf = new MoonlightProjectConfiguration(name);

            conf.CopyFrom(base.CreateConfiguration(name));
            return(conf);
        }
Ejemplo n.º 3
0
		ExecutionCommand CreateExecutionCommand (ConfigurationSelector solutionConfig, MoonlightProjectConfiguration configuration)
		{
			string url = GetUrl (configuration);
			if (url != null) {
				return new MoonlightExecutionCommand (this.Name, url) {
					UserAssemblyPaths = GetUserAssemblyPaths (solutionConfig)
				};
			}
			return null;
		}
Ejemplo n.º 4
0
		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;
		}
Ejemplo n.º 5
0
		ExecutionCommand CreateExecutionCommand (ConfigurationSelector solutionConfig, MoonlightProjectConfiguration configuration)
		{
			string url = GetUrl (configuration);
			if (url != null) {
				return new MoonlightExecutionCommand (this.Name, url) {
					UserAssemblyPaths = GetUserAssemblyPaths (solutionConfig)
				};
			}
			return null;
		}
Ejemplo n.º 6
0
		public override SolutionItemConfiguration CreateConfiguration (string name)
		{
			var conf = new MoonlightProjectConfiguration (name);
			conf.CopyFrom (base.CreateConfiguration (name));		
			return conf;
		}