Exemplo n.º 1
0
		public override void Build()
		{
			var restBuilder = new RestBuilder(logic);

			foreach (var item in restBuilder.Resources)
			{
				web.AddFile(new ApiControllerFile(web, type, item));
				if (Vs.Helper.Solution.UseTypeScript)
				{
					var service = WebFrameworkFileFactory.GetTypeScriptFile(web, type, item);
					web.AddFile(service);
					
				}
				else
				{
					var service = WebFrameworkFileFactory.GetJavaScriptFile(web, type, item);					
					web.AddFile(service);
				}
			}
			var modelTypes = new ClientModelFactory(logic).GetTypes();

			web.AddFile(new ApiControllerBaseFile(web));

			if (Vs.Helper.Solution.UseTypeScript)
			{
				var models = WebFrameworkFileFactory.GetTypeScriptModelsFile(web, modelTypes.ToArray());
				web.AddFile(models);
			}
			web.AddFile(new CustomAuhtorizeAttributeFile(web));
			web.AddFile(new IndexHtmlFile(web));
		}
Exemplo n.º 2
0
		public override void Build()
		{
			var modelTypes = new ClientModelFactory(logic).GetTypes();
			var models = new ModelsFile(pcl, modelTypes.ToArray());
			pcl.AddFile(models);
		}