/// <summary> /// Generating a typescript model. /// </summary> /// <param name="entity">An entity.</param> private void TransformDataModel(EntityInfo entity) { if (entity != null && entity.Id != null) { string fileToWritePath = ""; string textToWrite = ""; if (entity.IsEnum) { EnumTemplate enumTemplate = new EnumTemplate(entity); string enumDirectoryPath = Path.Combine(enumTemplate.OutputPath); string enumFilename = TextConverter.CamelCase(entity.Id) + "Enum.ts"; fileToWritePath = Path.Combine(_context.BasePath, enumDirectoryPath, enumFilename); textToWrite = enumTemplate.TransformText(); } else { DataModelTemplate dataModelTemplate = new DataModelTemplate(entity); string dataModelDirectoryPath = Path.Combine(dataModelTemplate.OutputPath); string dataModelFilename = TextConverter.CamelCase(entity.Id) + "Model.ts"; fileToWritePath = Path.Combine(_context.BasePath, dataModelDirectoryPath, dataModelFilename); textToWrite = dataModelTemplate.TransformText(); } _writingService.WriteFile(fileToWritePath, textToWrite); } }
/// <summary> /// Create a spec file for each component. /// </summary> /// <param name="smartApp">A SmartApp's manifeste.</param> private void TransformComponentSpecs(SmartAppInfo smartApp) { if (smartApp != null && smartApp.Concerns.AsEnumerable() != null && smartApp.Version != null) { foreach (ConcernInfo concern in smartApp.Concerns.AsEnumerable()) { if (concern != null && concern.Id != null && concern.Layouts.AsEnumerable() != null) { foreach (LayoutInfo layout in concern.Layouts.AsEnumerable()) { if (layout != null) { ComponentSpecTemplate componentsSpecTemplate = new ComponentSpecTemplate(smartApp.Id, concern, layout, smartApp.Languages, smartApp.Api); string componentsSpecDirectoryPath = Path.Combine(componentsSpecTemplate.OutputPath, TextConverter.CamelCase(concern.Id), TextConverter.CamelCase(layout.Id)); string componentsSpecFilename = TextConverter.CamelCase(concern.Id) + "-" + TextConverter.CamelCase(layout.Id) + ".spec.ts"; string fileToWritePath = Path.Combine(_context.BasePath, componentsSpecDirectoryPath, componentsSpecFilename); string textToWrite = componentsSpecTemplate.TransformText(); _writingService.WriteFile(fileToWritePath, textToWrite); } } } } } }
private void TransformViews(SmartAppInfo manifest) { if (manifest != null) { var enabledEntities = manifest.DataModel.Entities.Where(e => !e.IsAbstract); var applicationId = manifest.Id; foreach (var entity in enabledEntities) { IndexTemplate indexTemplate = new IndexTemplate(entity, applicationId); ShowTemplate showTemplate = new ShowTemplate(entity, applicationId); CreateTemplate createTemplate = new CreateTemplate(entity, applicationId); EditTemplate editTemplate = new EditTemplate(entity, applicationId); DeleteTemplate deleteTemplate = new DeleteTemplate(entity, applicationId); var folderName = TextConverter.CamelCase(entity.Id); _writingService.WriteFile(Path.Combine(_context.BasePath, indexTemplate.OutputPath, folderName, "index.blade.php"), indexTemplate.TransformText()); _writingService.WriteFile(Path.Combine(_context.BasePath, showTemplate.OutputPath, folderName, "show.blade.php"), showTemplate.TransformText()); _writingService.WriteFile(Path.Combine(_context.BasePath, createTemplate.OutputPath, folderName, "create.blade.php"), createTemplate.TransformText()); _writingService.WriteFile(Path.Combine(_context.BasePath, editTemplate.OutputPath, folderName, "edit.blade.php"), editTemplate.TransformText()); _writingService.WriteFile(Path.Combine(_context.BasePath, deleteTemplate.OutputPath, folderName, "delete.blade.php"), deleteTemplate.TransformText()); } } }
public string GetPrimaryKey() { var model = (EntityInfo)Model; if (model != null && model.AllProperties() != null) { var property = model.AllProperties().FirstOrDefault <PropertyInfo>(p => p.IsKey.Equals(true)); return(property != null?TextConverter.CamelCase(property.Id) : string.Empty); } return(string.Empty); }
/// <summary> /// Generating an angular module containing the configuration /// required to get the page integrated in the Ionic 2 navigation. /// Ionic 2 recommends a module for each page. One page = one layout. /// </summary> /// <param name="concernId">A concern Id.</param> /// <param name="layout">A layout.</param> /// <param name="languages">A list of languages. (can be null)</param> /// <param name="api">A lit of apis.</param> public void TransformLayoutModule(string concernId, LayoutInfo layout, LanguageList languages, ApiList api) { if (concernId != null && layout != null && layout.Id != null && api != null) { LayoutModuleTemplate layoutModuleTemplate = new LayoutModuleTemplate(concernId, layout, languages, api); string layoutModuleDirectoryPath = Path.Combine(layoutModuleTemplate.OutputPath, TextConverter.CamelCase(concernId), TextConverter.CamelCase(layout.Id)); string layoutModuleFilename = TextConverter.CamelCase(concernId) + "-" + TextConverter.CamelCase(layout.Id) + ".module.ts"; string fileToWritePath = Path.Combine(_context.BasePath, layoutModuleDirectoryPath, layoutModuleFilename); string textToWrite = layoutModuleTemplate.TransformText(); _writingService.WriteFile(fileToWritePath, textToWrite); } }
/// <summary> /// Generating typescript models containing the /// definition of the viewmodel for the current layout. /// </summary> /// <param name="dataModel">A dataModel.</param> private void TransformViewModel(EntityInfo dataModel) { if (dataModel != null && dataModel.Id != null) { ViewModelTemplate viewModelTemplate = new ViewModelTemplate(dataModel); string viewModelDirectoryPath = viewModelTemplate.OutputPath; string viewModelFilename = TextConverter.CamelCase(dataModel.Id) + ".ts"; string fileToWritePath = Path.Combine(_context.BasePath, viewModelDirectoryPath, viewModelFilename); string textToWrite = viewModelTemplate.TransformText(); _writingService.WriteFile(fileToWritePath, textToWrite); } }
/// <summary> /// Retrieve the specific menu for each concern. /// </summary> /// <param name="concern">A concern.</param> public Dictionary <string, string> getMenu(ConcernInfo concern) { Dictionary <string, string> menu = new Dictionary <string, string>(); if (concern != null && concern.Id != null && concern.Layouts.AsEnumerable() != null) { foreach (LayoutInfo layout in concern.Layouts.AsEnumerable()) { if (layout.IsVisibleInMenu && layout.Id != null && layout.Title != null && !menu.ContainsKey(TextConverter.CamelCase(concern.Id) + "-" + TextConverter.CamelCase(layout.Id))) { menu.Add(TextConverter.CamelCase(concern.Id) + "-" + TextConverter.CamelCase(layout.Id), layout.Title); } } } return(menu); }
/// <summary> /// Generating a HTML file containing the view description for the /// current layout. /// Ionic 2 recommends a HTML file for each page. One page = one layout. /// </summary> /// <param name="smartAppTitle">A SmartApp title.</param> /// <param name="concern">A concern.</param> /// <param name="layout">A layout.</param> /// <param name="languages">A list of languages. (can be null)</param> public void TransformLayoutView(string smartAppTitle, ConcernInfo concern, LayoutInfo layout, LanguageList languages) { // languages can be null if (smartAppTitle != null && concern != null && concern.Id != null && layout != null && layout.Id != null) { LayoutViewTemplate layoutViewTemplate = new LayoutViewTemplate(smartAppTitle, concern, layout, languages); string layoutViewDirectoryPath = Path.Combine(layoutViewTemplate.OutputPath, TextConverter.CamelCase(concern.Id), TextConverter.CamelCase(layout.Id)); string layoutViewFilename = TextConverter.CamelCase(concern.Id) + "-" + TextConverter.CamelCase(layout.Id) + ".html"; string fileToWritePath = Path.Combine(_context.BasePath, layoutViewDirectoryPath, layoutViewFilename); string textToWrite = layoutViewTemplate.TransformText(); _writingService.WriteFile(fileToWritePath, textToWrite); } }
/// <summary> /// Create a spec file for each service. /// </summary> /// <param name="smartApp">A SmartApp's manifeste.</param> private void TransformServicesSpecs(SmartAppInfo smartApp) { if (smartApp != null && smartApp.Api.AsEnumerable() != null) { foreach (ApiInfo api in smartApp.Api.AsEnumerable()) { ServiceSpecTemplate servicesSpecsTemplate = new ServiceSpecTemplate(api); string servicesSpecsDirectoryPath = servicesSpecsTemplate.OutputPath; string servicesSpecsFilename = TextConverter.CamelCase(api.Id) + ".spec.ts"; string fileToWritePath = Path.Combine(_context.BasePath, servicesSpecsDirectoryPath, servicesSpecsFilename); string textToWrite = servicesSpecsTemplate.TransformText(); _writingService.WriteFile(fileToWritePath, textToWrite); } } }
/// <summary> /// Start function for the generation of all apis. /// </summary> /// <param name="smartApp">A SmartApp's manifeste.</param> /// <param name="apiTemplatesDirectoryPath">Path to api activity templates.</param> private void TransformApi(SmartAppInfo smartApp, string apiTemplatesDirectoryPath) { if (smartApp != null && smartApp.Api.AsEnumerable() != null) { foreach (ApiInfo api in smartApp.Api.AsEnumerable()) { ApiTemplate apiTemplate = new ApiTemplate(api); string apiDirectoryPath = apiTemplate.OutputPath; string apiFilename = TextConverter.CamelCase(api.Id) + ".service.ts"; string fileToWritePath = Path.Combine(_context.BasePath, apiDirectoryPath, apiFilename); string textToWrite = apiTemplate.TransformText(); _writingService.WriteFile(fileToWritePath, textToWrite); } _writingService.CopyDirectory(apiTemplatesDirectoryPath, _context.BasePath); } }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\nimport React, { Component } from \'react\';\r\nimport { connect } from \'react-redux" + "\';\r\nimport { bindActionCreators } from \'redux\';\r\n\r\nimport * as "); #line 6 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_layout.Id))); #line default #line hidden this.Write("Actions from \'../../Actions/"); #line 6 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_concern.Id))); #line default #line hidden this.Write("/"); #line 6 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_layout.Id))); #line default #line hidden this.Write("Actions\'; \r\n/*import {\r\n"); #line 8 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" foreach (var action in _layout.Actions.AsEnumerable()) { if (!action.Type.ToLower().Equals("navigation")) { if (action.Id.ToLower().Equals("delete")) { action.Id = TextConverter.CamelCase(action.Id) + TextConverter.PascalCase(_concern.Id); } #line default #line hidden this.Write(" "); #line 18 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write(",\r\n"); #line 19 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" } } #line default #line hidden this.Write(" } from \'../../Actions/"); #line 23 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_concern.Id))); #line default #line hidden this.Write("/"); #line 23 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_layout.Id))); #line default #line hidden this.Write("Actions\';*/\r\n\r\n"); #line 25 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" if (_layout != null) { #line default #line hidden this.Write("class "); #line 29 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_layout.Id))); #line default #line hidden this.Write("Container extends Component {\r\n componentDidMount() {\r\n"); #line 31 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" foreach (var action in _layout.Actions.AsEnumerable()) { if (action.Type.ToLower().Equals("datalist")) { #line default #line hidden this.Write(" this.props."); #line 37 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("();\r\n"); #line 38 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" } } #line default #line hidden this.Write(" }\r\n\r\n"); #line 44 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" if (_navigationActions != null && _navigationActions.Count > 0) { foreach (var action in _layout.Actions.AsEnumerable()) { if (action.Type.ToLower().Equals("navigation")) { #line default #line hidden this.Write(" on"); #line 52 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.Id))); #line default #line hidden this.Write(" = () => {\r\n this.props.navigation.navigate(\'"); #line 53 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Target)); #line default #line hidden this.Write("\');\r\n }\r\n"); #line 55 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" } } } #line default #line hidden this.Write(@" render() { if (this.props.hasErrored) { return <p>Sorry! There was an error loading the items</p>; } if (this.props.isLoading) { return <p>Loading…</p>; } return ( <"); #line 71 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_layout.Id))); #line default #line hidden this.Write("Screen items={this.props.data} \r\n"); #line 72 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" if (_navigationActions != null && _navigationActions.Count > 0) { foreach (var action in _layout.Actions.AsEnumerable()) { if (action.Type.ToLower().Equals("navigation")) { #line default #line hidden this.Write(" on"); #line 80 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.Id))); #line default #line hidden this.Write("={ this.on"); #line 80 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.Id))); #line default #line hidden this.Write(" }\r\n"); #line 81 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" } } } #line default #line hidden this.Write(@" /> ); } } const mapStateToProps = (state) => { return { navigation: state.navigation, data: state.data, hasErrored: state.itemsHasErrored, isLoading: state.itemsIsLoading }; }; const mapDispatchToProps = (dispatch) => { return { "); #line 102 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" foreach (var action in _layout.Actions.AsEnumerable()) { if (!action.Type.ToLower().Equals("navigation")) { #line default #line hidden this.Write(" //"); #line 108 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write(": () => dispatch("); #line 108 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("()),\r\n"); #line 109 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" } } #line default #line hidden this.Write(" actions:bindActionCreators("); #line 113 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_layout.Id))); #line default #line hidden this.Write("Actions, dispatch)\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDisp" + "atchToProps)("); #line 117 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_layout.Id))); #line default #line hidden this.Write("Container);\r\n"); #line 118 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Containers\Templates\ContainerTemplate.tt" } #line default #line hidden return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\nimport initialState from \'../InitialState\';\r\n"); #line 3 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" if (_concern != null && _layout != null && _layout.Actions != null && _layout.Actions.Count > 0) { #line default #line hidden this.Write("import {\r\n"); #line 8 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" foreach (ActionInfo action in _layout.Actions.AsEnumerable()) { if (action.Id != null && action.Type != null) { if (!action.Type.ToLower().Equals("navigation")) { #line default #line hidden this.Write(" "); #line 16 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 16 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_REQUEST,\r\n "); #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_SUCCESS,\r\n "); #line 18 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 18 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_FAILURE,\r\n"); #line 19 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" } } } #line default #line hidden this.Write("} from \'../../Actions/"); #line 24 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_concern.Id))); #line default #line hidden this.Write("/"); #line 24 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_layout.Id))); #line default #line hidden this.Write("Actions\';\r\n\r\nexport default function "); #line 26 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_layout.Id))); #line default #line hidden this.Write("Reducer(state = null, action) {\r\n switch (action.type) {\r\n"); #line 28 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" foreach (ActionInfo action in _layout.Actions.AsEnumerable()) { if (action.Id != null && action.Type != null) { if (!action.Type.ToLower().Equals("navigation")) { #line default #line hidden this.Write(" case "); #line 36 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 36 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_REQUEST:\r\n return action.isLoading;\r\n\r\n case "); #line 39 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 39 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_SUCCESS:\r\n return[\r\n ...state,\r\n Object" + ".assign({}, action."); #line 42 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_layout.Id))); #line default #line hidden this.Write(")\r\n ];\r\n\r\n case "); #line 45 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 45 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_FAILURE:\r\n return [\r\n ...state,\r\n Obje" + "ct.assign({}, { isLoading: false }, action.error)\r\n ];\r\n\r\n"); #line 51 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" } } } #line default #line hidden this.Write(" default:\r\n return state;\r\n }\r\n}\r\n"); #line 60 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Reducers\Templates\ReducersTemplate.tt" } #line default #line hidden return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\n"); #line 2 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" var model = (EntityInfo)Model; #line default #line hidden #line 5 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" if (_dataModel != null && _dataModel.Id != null) { List <string> alreadyImported = new List <string>(); if (_constructorParametersObj.AsEnumerable() != null) { foreach (var property in _constructorParametersObj.AsEnumerable()) { if (property.Target != null && property.Type != null && !alreadyImported.AsEnumerable().Contains(property.Type)) { alreadyImported.Add(property.Type); #line default #line hidden this.Write("import "); #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(property.Type))); #line default #line hidden #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelSuffix)); #line default #line hidden this.Write(" from \'../Models/"); #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Type))); #line default #line hidden this.Write("."); #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelSuffix.ToLower())); #line default #line hidden this.Write("\';\r\n"); #line 18 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" } } } if (_dataModel.References.AsEnumerable() != null) { foreach (ReferenceInfo reference in _dataModel.References.AsEnumerable()) { if (reference.Target != null && reference.Type != null && !alreadyImported.AsEnumerable().Contains(reference.Type)) { alreadyImported.Add(reference.Type); #line default #line hidden this.Write("import "); #line 30 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(reference.Type))); #line default #line hidden #line 30 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelSuffix)); #line default #line hidden this.Write(" from \'../Models/"); #line 30 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Type))); #line default #line hidden this.Write("."); #line 30 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelSuffix.ToLower())); #line default #line hidden this.Write("\';\r\n"); #line 31 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" } } } #line default #line hidden this.Write("\r\nexport class "); #line 37 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_dataModel.Id))); #line default #line hidden #line 37 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_viewModelSuffix)); #line default #line hidden this.Write(" {\r\n\r\n constructor(\r\n"); #line 40 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" if (_constructorParametersObj.AsEnumerable() != null && _constructorParametersObj.AsEnumerable().Count() > 0) { int count = _constructorParametersObj.AsEnumerable().Count() - 1; int counter = 0; Dictionary <string, int> countConstructor = new Dictionary <string, int>(); foreach (PropertyInfo property in _constructorParametersObj.AsEnumerable()) { if (property.Id != null && property.TypeScriptType() != null) { string propertyIsModel = IsModel(property); if (!countConstructor.ContainsKey(property.Id)) { countConstructor.Add(property.Id, 1); } else { countConstructor[property.Id] = countConstructor[property.Id] + 1; } string type = property.TypeScriptType(); if (!propertyIsModel.Equals("")) { type = TextConverter.PascalCase(type); } if (counter == count) { #line default #line hidden this.Write(" "); #line 63 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countConstructor[property.Id])); #line default #line hidden this.Write("\r\n"); #line 64 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 69 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countConstructor[property.Id])); #line default #line hidden this.Write(",\r\n"); #line 70 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" } } counter++; } } #line default #line hidden this.Write(" ) {\r\n\r\n "); #line 79 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" Dictionary <string, int> countObj = new Dictionary <string, int>(); if (_dataModel.Properties.AsEnumerable() != null) { foreach (PropertyInfo property in _dataModel.Properties.AsEnumerable()) { if (property.Id != null) { if (!countObj.ContainsKey(property.Id)) { countObj.Add(property.Id, 1); } else { countObj[property.Id] = countObj[property.Id] + 1; } #line default #line hidden this.Write(" this."); #line 92 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write(" = "); #line 92 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countObj[property.Id])); #line default #line hidden this.Write(";\r\n"); #line 93 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" } } } if (_dataModel.References.AsEnumerable() != null) { foreach (ReferenceInfo reference in _dataModel.References.AsEnumerable()) { if (reference.Id != null) { if (!countObj.ContainsKey(reference.Id)) { countObj.Add(reference.Id, 1); } else { countObj[reference.Id] = countObj[reference.Id] + 1; } #line default #line hidden this.Write(" this."); #line 109 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id))); #line default #line hidden this.Write(" = "); #line 109 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id) + countObj[reference.Id])); #line default #line hidden this.Write(";\r\n"); #line 110 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" } } } #line default #line hidden this.Write(" }\r\n}\r\n"); #line 117 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\ViewModels\Templates\ViewModelTemplate.tt" } #line default #line hidden return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\n"); this.Write(@"/* * You should add your licence here, here is an example : * * SonarQube, open source software quality management tool. * Copyright (C) 2008-2013 SonarSource * mailto:contact AT sonarsource DOT com * * SonarQube is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * SonarQube is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ "); #line 24 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" if (_entity != null) { if (_entity.Extends != null) { #line default #line hidden this.Write("import { "); #line 30 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_entity.Extends))); #line default #line hidden this.Write("Model } from \'./"); #line 30 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_entity.Extends))); #line default #line hidden this.Write("Model\';\r\n"); #line 31 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } List <string> alreadyImported = new List <string>(); if (_constructorParametersObj.AsEnumerable() != null) { foreach (PropertyInfo property in _constructorParametersObj.AsEnumerable()) { if (property.Target != null && property.Type != null && !alreadyImported.AsEnumerable().Contains(property.Type)) { alreadyImported.Add(property.Type); if (property.Target.IsEnum) { #line default #line hidden this.Write("import { "); #line 45 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(property.Type))); #line default #line hidden this.Write("Enum } from \'./"); #line 45 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Type))); #line default #line hidden this.Write("Enum\';\r\n"); #line 46 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } else { #line default #line hidden this.Write("import { "); #line 51 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(property.Type))); #line default #line hidden this.Write("Model } from \'./"); #line 51 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Type))); #line default #line hidden this.Write("Model\';\r\n"); #line 52 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } } } } if (_entity.References.AsEnumerable() != null) { foreach (ReferenceInfo reference in _entity.References.AsEnumerable()) { if (reference.Target != null && reference.Type != null && !alreadyImported.AsEnumerable().Contains(reference.Type)) { alreadyImported.Add(reference.Type); if (reference.Target.IsEnum) { #line default #line hidden this.Write("import { "); #line 68 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(reference.Type))); #line default #line hidden this.Write("Enum } from \'./"); #line 68 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Type))); #line default #line hidden this.Write("Enum\';\r\n"); #line 69 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } else { #line default #line hidden this.Write("import { "); #line 74 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(reference.Type))); #line default #line hidden this.Write("Model } from \'./"); #line 74 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Type))); #line default #line hidden this.Write("Model\';\r\n"); #line 75 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } } } } if (_entity.Id != null) { #line default #line hidden this.Write("/**\r\n * class: "); #line 85 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_entity.Id))); #line default #line hidden this.Write(".\r\n * You should add a description of your entity here.\r\n * This model is a refer" + "ence used in viewModels or\r\n * in another referenced model.\r\n * This model is ge" + "nerated from DataModel domain.\r\n */\r\nexport "); #line 91 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" if (_entity.IsAbstract) { #line default #line hidden this.Write("abstract "); #line 91 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } #line default #line hidden this.Write("class "); #line 91 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_entity.Id))); #line default #line hidden this.Write("Model"); #line 91 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" if (_entity.Extends != null) { #line default #line hidden this.Write(" extends "); #line 91 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_entity.Extends))); #line default #line hidden this.Write("Model"); #line 91 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } #line default #line hidden this.Write(" {\r\n"); #line 92 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" if (_entity.Properties.AsEnumerable() != null) { foreach (PropertyInfo property in _entity.Properties.AsEnumerable()) { if (property.Id != null && property.TypeScriptType() != null && property.IsCollection) { #line default #line hidden this.Write(" /**\r\n * property.\r\n * isCollection.\r\n */\r\n public "); #line 104 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write(": "); #line 104 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.TypeScriptType())); #line default #line hidden this.Write("[];\r\n"); #line 105 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } else if (property.Id != null && property.TypeScriptType() != null) { #line default #line hidden this.Write(" /**\r\n * property.\r\n */\r\n public "); #line 113 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write(": "); #line 113 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.TypeScriptType())); #line default #line hidden this.Write(";\r\n"); #line 114 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } } } if (_entity.References.AsEnumerable() != null) { foreach (ReferenceInfo reference in _entity.References.AsEnumerable()) { if (reference.Id != null && reference.Target != null && reference.Target.IsEnum) { #line default #line hidden this.Write(" /**\r\n * reference.\r\n * isEnum.\r\n */\r\n public "); #line 130 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id))); #line default #line hidden this.Write(": "); #line 130 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(reference.TypeScriptType()))); #line default #line hidden this.Write("Enum;\r\n"); #line 131 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } else if (reference.Id != null && reference.TypeScriptType() != null && reference.IsCollection) { #line default #line hidden this.Write(" /**\r\n * reference.\r\n * isCollection.\r\n */\r\n public "); #line 140 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id))); #line default #line hidden this.Write(": "); #line 140 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(reference.TypeScriptType()))); #line default #line hidden this.Write("Model[];\r\n"); #line 141 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } else if (reference.Id != null && reference.TypeScriptType() != null) { #line default #line hidden this.Write(" /**\r\n * reference.\r\n */\r\n public "); #line 149 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id))); #line default #line hidden this.Write(": "); #line 149 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(reference.TypeScriptType()))); #line default #line hidden this.Write("Model;\r\n"); #line 150 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } } } #line default #line hidden this.Write(" constructor(\r\n"); #line 156 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" if (_constructorParametersObj.AsEnumerable() != null && _constructorParametersObj.AsEnumerable().Count() > 0) { int lastIndex = _constructorParametersObj.AsEnumerable().Count() - 1; int index = 0; Dictionary <string, int> countConstructor = new Dictionary <string, int>(); foreach (PropertyInfo property in _constructorParametersObj.AsEnumerable()) { if (property.Id != null && property.TypeScriptType() != null) { string propertyIsModel = IsModelOrEnum(property); if (!countConstructor.ContainsKey(property.Id)) { countConstructor.Add(property.Id, 1); } else { countConstructor[property.Id] = countConstructor[property.Id] + 1; } string type = property.TypeScriptType(); if (!propertyIsModel.Equals("")) { type = TextConverter.PascalCase(type); } if (property.IsCollection && index == lastIndex) { #line default #line hidden this.Write(" "); #line 179 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countConstructor[property.Id])); #line default #line hidden this.Write(": "); #line 179 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type + propertyIsModel)); #line default #line hidden this.Write("[]\r\n"); #line 180 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } else if (index == lastIndex) { #line default #line hidden this.Write(" "); #line 185 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countConstructor[property.Id])); #line default #line hidden this.Write(": "); #line 185 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type + propertyIsModel)); #line default #line hidden this.Write("\r\n"); #line 186 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } else if (property.IsCollection) { #line default #line hidden this.Write(" "); #line 191 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countConstructor[property.Id])); #line default #line hidden this.Write(": "); #line 191 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type + propertyIsModel)); #line default #line hidden this.Write("[],\r\n"); #line 192 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 197 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countConstructor[property.Id])); #line default #line hidden this.Write(": "); #line 197 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type + propertyIsModel)); #line default #line hidden this.Write(",\r\n"); #line 198 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } } index++; } } #line default #line hidden this.Write(" ) {\r\n"); #line 206 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" Dictionary <string, int> countObj = new Dictionary <string, int>(); if (_superPropertiesObj.AsEnumerable() != null && _superPropertiesObj.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" super(\r\n"); #line 212 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" int lastIndex = _superPropertiesObj.AsEnumerable().Count() - 1; int index = 0; foreach (PropertyInfo property in _superPropertiesObj.AsEnumerable()) { if (property.Id != null) { if (!countObj.ContainsKey(property.Id)) { countObj.Add(property.Id, 1); } else { countObj[property.Id] = countObj[property.Id] + 1; } if (index == lastIndex) { #line default #line hidden this.Write(" "); #line 227 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countObj[property.Id])); #line default #line hidden this.Write("\r\n"); #line 228 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 233 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countObj[property.Id])); #line default #line hidden this.Write(",\r\n"); #line 234 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } } index++; } #line default #line hidden this.Write(" );\r\n"); #line 241 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } if (_entity.Properties.AsEnumerable() != null) { foreach (PropertyInfo property in _entity.Properties.AsEnumerable()) { if (property.Id != null) { if (!countObj.ContainsKey(property.Id)) { countObj.Add(property.Id, 1); } else { countObj[property.Id] = countObj[property.Id] + 1; } #line default #line hidden this.Write(" this."); #line 255 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write(" = "); #line 255 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countObj[property.Id])); #line default #line hidden this.Write(";\r\n"); #line 256 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } } } if (_entity.References.AsEnumerable() != null) { foreach (ReferenceInfo reference in _entity.References.AsEnumerable()) { if (reference.Id != null) { if (!countObj.ContainsKey(reference.Id)) { countObj.Add(reference.Id, 1); } else { countObj[reference.Id] = countObj[reference.Id] + 1; } #line default #line hidden this.Write(" this."); #line 272 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id))); #line default #line hidden this.Write(" = "); #line 272 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id) + countObj[reference.Id])); #line default #line hidden this.Write(";\r\n"); #line 273 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } } } #line default #line hidden this.Write(" }\r\n}\r\n"); #line 280 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\DataModel\Templates\DataModelTemplate.tt" } } #line default #line hidden return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("<?php\r\n\r\nnamespace App\\ViewModels;\r\n\r\nuse Illuminate\\Database\\Eloquent\\Model;\r\n\r\n" + "class "); #line 8 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_dataModel.Id))); #line default #line hidden #line 8 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_viewModelSuffix)); #line default #line hidden this.Write(" extends Model{\r\n"); #line 9 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" if (_dataModel.Properties != null && _dataModel.Properties.Count > 0) { #line default #line hidden this.Write("\r\n //Property.\r\n"); #line 15 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" foreach (PropertyInfo property in _dataModel.Properties.AsEnumerable()) { if (property.Id != null && property.Type != null && property.IsCollection) { #line default #line hidden this.Write(" private $"); #line 21 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write(";\r\n"); #line 22 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" } else if (property.Id != null && property.Type != null) { #line default #line hidden this.Write(" private $"); #line 26 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write(";\r\n"); #line 27 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" } } } #line default #line hidden this.Write("\r\n"); #line 33 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" if (_dataModel.References != null && _dataModel.References.Count > 0) { #line default #line hidden this.Write(" //Reference\r\n"); #line 38 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" foreach (ReferenceInfo reference in _dataModel.References.AsEnumerable()) { if (reference.Id != null && reference.Target != null && reference.IsCollection) { #line default #line hidden this.Write(" private $"); #line 44 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id))); #line default #line hidden this.Write(";\r\n"); #line 45 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" } else if (reference.Id != null && reference.Type != null) { #line default #line hidden this.Write(" private $"); #line 50 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id))); #line default #line hidden this.Write(";\r\n"); #line 51 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" } } } #line default #line hidden this.Write("\r\n public function __construct(\r\n"); #line 58 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" if (_constructorParametersObj.AsEnumerable() != null && _constructorParametersObj.AsEnumerable().Count() > 0) { int count = _constructorParametersObj.AsEnumerable().Count() - 1; int counter = 0; Dictionary <string, int> countConstructor = new Dictionary <string, int>(); foreach (PropertyInfo property in _constructorParametersObj.AsEnumerable()) { if (property.Id != null && property.Type != null) { string propertyIsModel = IsModel(property); if (!countConstructor.ContainsKey(property.Id)) { countConstructor.Add(property.Id, 1); } else { countConstructor[property.Id] = countConstructor[property.Id] + 1; } string type = property.Type; if (!propertyIsModel.Equals("")) { type = TextConverter.PascalCase(type); } if (property.IsCollection && counter == count) { #line default #line hidden this.Write(" $"); #line 81 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countConstructor[property.Id])); #line default #line hidden this.Write("\r\n"); #line 82 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" } else if (counter == count) { #line default #line hidden this.Write(" $"); #line 87 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countConstructor[property.Id])); #line default #line hidden this.Write("\r\n"); #line 88 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" } else if (property.IsCollection) { #line default #line hidden this.Write(" $"); #line 93 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countConstructor[property.Id])); #line default #line hidden this.Write(",\r\n"); #line 94 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" } else { #line default #line hidden this.Write(" $"); #line 99 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countConstructor[property.Id])); #line default #line hidden this.Write(",\r\n"); #line 100 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" } } counter++; } } #line default #line hidden this.Write(" ) {\r\n\r\n"); #line 109 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" Dictionary <string, int> countObj = new Dictionary <string, int>(); if (_dataModel.Properties.AsEnumerable() != null) { foreach (PropertyInfo property in _dataModel.Properties.AsEnumerable()) { if (property.Id != null) { if (!countObj.ContainsKey(property.Id)) { countObj.Add(property.Id, 1); } else { countObj[property.Id] = countObj[property.Id] + 1; } #line default #line hidden this.Write(" $this->"); #line 122 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write(" = $"); #line 122 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id) + countObj[property.Id])); #line default #line hidden this.Write(";\r\n"); #line 123 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" } } } if (_dataModel.References.AsEnumerable() != null) { foreach (ReferenceInfo reference in _dataModel.References.AsEnumerable()) { if (reference.Id != null) { if (!countObj.ContainsKey(reference.Id)) { countObj.Add(reference.Id, 1); } else { countObj[reference.Id] = countObj[reference.Id] + 1; } #line default #line hidden this.Write(" $this->"); #line 139 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id))); #line default #line hidden this.Write(" = $"); #line 139 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id) + countObj[reference.Id])); #line default #line hidden this.Write(";\r\n"); #line 140 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\ViewModels\Templates\ViewModelsTemplate.tt" } } } #line default #line hidden this.Write(" }\r\n}\r\n"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\n"); #line 2 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" var model = (SmartAppInfo)Model; #line default #line hidden this.Write("import RestApi from \'./RestApi\';\r\n\r\nexport default class "); #line 7 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_api.Id)); #line default #line hidden this.Write("Api{\r\n\r\n"); #line 9 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" if (_api.Actions != null && _api.Actions.Count > 0) { foreach (ApiActionInfo action in _api.Actions) { if (action.Id != null && action.Url != null && action.Type != null) { #line default #line hidden this.Write(" "); #line 16 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("(\r\n"); #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 28 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("\r\n"); #line 29 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 34 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(",\r\n"); #line 35 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" } } } } #line default #line hidden this.Write(" ) {\r\n"); #line 43 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" switch (action.Type) { case "dataget": case "datalist": if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" let urlSearchParams = {};\r\n"); #line 52 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { #line default #line hidden this.Write(" urlSearchParams[\'"); #line 58 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("\'] = JSON.stringify("); #line 58 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(");\r\n"); #line 59 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" } } #line default #line hidden this.Write(" return RestApi.get(\'"); #line 63 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Url)); #line default #line hidden this.Write("\', urlSearchParams) ;\r\n"); #line 64 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" return RestApi.get(\'"); #line 69 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Url)); #line default #line hidden this.Write("\');\r\n"); #line 70 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" } break; case "datacreate": #line default #line hidden this.Write(" let postData = {};\r\n"); #line 76 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { #line default #line hidden this.Write(" postData[\'"); #line 84 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("\'] = "); #line 84 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(";\r\n"); #line 85 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" } } } #line default #line hidden this.Write(" return RestApi.post(\'"); #line 90 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Url)); #line default #line hidden this.Write("\', postData);\r\n"); #line 91 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" break; case "dataupdate": #line default #line hidden this.Write(" let putData = {};\r\n"); #line 96 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { #line default #line hidden this.Write(" putData[\'"); #line 104 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("\'] = "); #line 104 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(";\r\n"); #line 105 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" } } } #line default #line hidden this.Write(" return RestApi.put(\'"); #line 110 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Url)); #line default #line hidden this.Write("\', putData);\r\n"); #line 111 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" break; case "datadelete": #line default #line hidden this.Write(" let urlSearchParams = {};\r\n"); #line 116 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { #line default #line hidden this.Write(" urlSearchParams[\'"); #line 124 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("\'] = JSON.stringify("); #line 124 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(");\r\n"); #line 125 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" } } } #line default #line hidden this.Write(" return RestApi.delete(\'"); #line 130 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Url)); #line default #line hidden this.Write("\', urlSearchParams);\r\n"); #line 131 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" break; default: break; } #line default #line hidden this.Write(" }\r\n\r\n"); #line 138 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Apis\Templates\ApiTemplate.tt" } } } #line default #line hidden this.Write("}"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\nimport React from \'react\';\r\nimport { \r\n Image,\r\n Text,\r\n Button,\r\n View,\r\n " + " ScrollView\r\n} from \'react-native\';\r\n\r\n// Styles\r\nimport styles from \'../Styles/" + "StyleSheet\';\r\n\r\nexport default class "); #line 14 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_layout.Id))); #line default #line hidden this.Write("Screen extends React.Component {\r\n static navigationOptions = {\r\n title" + ":\'"); #line 16 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_layout.Title))); #line default #line hidden this.Write(" Screen\'\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n }\r\n"); #line 22 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" if (_layout.Actions.AsEnumerable() != null) { foreach (var action in _layout.Actions.AsEnumerable()) { switch (action.Type.ToLower()) { case "navigation": if (action.Target != null) { string[] actionTargetSplitted = action.Target.Split('.'); string targetedConcern = TextConverter.PascalCase(actionTargetSplitted[0]); string targetedLayout = TextConverter.PascalCase(actionTargetSplitted[1]); #line default #line hidden this.Write("\r\n "); #line 37 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write(" = () => {\r\n this.props.on"); #line 38 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.Id))); #line default #line hidden this.Write("();\r\n }\r\n"); #line 40 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" } break; case "method": #line default #line hidden this.Write("\r\n "); #line 46 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write(" = () => {\r\n //TODO\r\n }\r\n"); #line 49 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" break; case "dataget": case "datalist": case "datacreate": case "dataupdate": case "datadelete": if (action.Api != null && _api != null) { string[] actionSplitted = action.Api.Split('.'); string apiService = actionSplitted[0]; string apiAction = actionSplitted[1]; foreach (ApiInfo api in _api.AsEnumerable()) { if (api.Id.ToLower().Equals(apiService.ToLower()) && api.Actions.AsEnumerable() != null) { foreach (ApiActionInfo apiA in api.Actions.AsEnumerable()) { if (apiA.Id.ToLower().Equals(apiAction.ToLower())) { #line default #line hidden this.Write("\r\n "); #line 68 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write(" = (\r\n"); #line 69 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" if (apiA.Parameters.AsEnumerable() != null && apiA.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = apiA.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in apiA.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { // string type = apiParameter.TypeScriptType(); // type = IsModelBool(type) ? type + _viewModelSuffix : type; if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 82 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("\r\n"); #line 83 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 88 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(",\r\n"); #line 89 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" } } } } #line default #line hidden this.Write(" ) => {\r\n return this._"); #line 96 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(api.Id) + _apiSuffix)); #line default #line hidden this.Write("."); #line 96 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiA.Id))); #line default #line hidden this.Write("(\r\n"); #line 97 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" if (apiA.Parameters.AsEnumerable() != null && apiA.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = apiA.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in apiA.Parameters.AsEnumerable()) { if (apiParameter.Id != null && apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 106 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("\r\n"); #line 107 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 112 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(",\r\n"); #line 113 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" } } } #line default #line hidden this.Write(" );\r\n }\r\n"); #line 120 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" } } } } } break; } } } #line default #line hidden this.Write("\r\n render() {\r\n return (\r\n <View style={styles.container}>\r\n " + " <ScrollView>\r\n <View>\r\n"); #line 137 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" foreach (var action in _layout.Actions.AsEnumerable()) { if (action.Type.ToLower().Equals("navigation")) { #line default #line hidden this.Write(" <Button title=\""); #line 143 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(action.Id)))); #line default #line hidden this.Write("\" onPress={this."); #line 143 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("}/>\r\n"); #line 144 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" } } #line default #line hidden this.Write(" </View>\r\n <View>\r\n"); #line 150 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" foreach (var action in _layout.Actions.AsEnumerable()) { if (action.Type.ToLower().Equals("method")) { #line default #line hidden this.Write(" <Button title=\""); #line 156 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(action.Id)))); #line default #line hidden this.Write("\" onPress={this."); #line 156 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("}/>\r\n"); #line 157 "D:\01 Working\01 RedFabriq\01 working\new_generators\React-Native\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Views\Templates\ViewTemplate.tt" } } #line default #line hidden this.Write(" </View>\r\n </ScrollView>\r\n </View>\r\n " + " );\r\n }\r\n}"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\n"); #line 2 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (_smartApp != null && _smartApp.Id != null) { bool isLanguages = false; if (_smartApp.Languages.AsEnumerable() != null && _smartApp.Languages.AsEnumerable().Count() > 0) { isLanguages = true; } if (isLanguages) { #line default #line hidden this.Write("import { LanguagePageModule } from \'../pages/language/language.module\';\r\nimport {" + " TranslateModule, TranslateService } from \'@ngx-translate/core\';\r\nimport { Trans" + "lateServiceMock } from \'../../test-config/mocks/translateServiceMock\';\r\n"); #line 17 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(@"import { ComponentFixture, async, TestBed, fakeAsync, flushMicrotasks } from '@angular/core/testing'; import { IonicModule, Platform, NavController } from 'ionic-angular'; import { StatusBar } from '@ionic-native/status-bar'; import { SplashScreen } from '@ionic-native/splash-screen'; import { Title } from '@angular/platform-browser'; import { "); #line 26 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" } from \'./app.component\';\r\n"); #line 27 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (_smartApp.Concerns.AsEnumerable() != null && _rootLayout != null && _rootLayout.Id != null && _rootConcern != null && _rootConcern.Id != null) { string concern = TextConverter.PascalCase(_rootConcern.Id); string layout = TextConverter.PascalCase(_rootLayout.Id); string layoutComponent = concern + layout; string layoutComponentToLower = TextConverter.CamelCase(concern) + "-" + TextConverter.CamelCase(layout); #line default #line hidden this.Write("import { "); #line 35 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutComponent)); #line default #line hidden this.Write("PageModule } from \'../pages/"); #line 35 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(concern))); #line default #line hidden this.Write("/"); #line 35 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(layout))); #line default #line hidden this.Write("/"); #line 35 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutComponentToLower)); #line default #line hidden this.Write(".module\';\r\nimport { "); #line 36 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutComponent)); #line default #line hidden this.Write(" } from \'../pages/"); #line 36 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(concern))); #line default #line hidden this.Write("/"); #line 36 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(layout))); #line default #line hidden this.Write("/"); #line 36 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutComponentToLower)); #line default #line hidden this.Write("\';\r\n"); #line 37 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(@"import { PlatformMock } from '../../test-config/mocks/platformMock'; import { StatusBarMock } from '../../test-config/mocks/statusBarMock'; import { SplashScreenMock } from '../../test-config/mocks/splashScreenMock'; import { NavMock } from '../../test-config/mocks/navMock'; import { TitleMock } from '../../test-config/mocks/titleMock'; describe('"); #line 46 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" Component\', () => {\r\n let fixture: ComponentFixture<"); #line 47 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(">;\r\n let component: "); #line 48 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(";\r\n\r\n let spy: jasmine.Spy;\r\n\r\n beforeEach(async(() => {\r\n TestBed.configure" + "TestingModule({\r\n declarations: ["); #line 54 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write("],\r\n imports: [\r\n"); #line 56 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (isLanguages) { #line default #line hidden this.Write(" LanguagePageModule,\r\n TranslateModule.forChild(),\r\n"); #line 62 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden #line 65 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (_smartApp.Concerns.AsEnumerable() != null && _rootLayout != null && _rootLayout.Id != null && _rootConcern != null && _rootConcern.Id != null) { string concern = TextConverter.PascalCase(_rootConcern.Id); string layout = TextConverter.PascalCase(_rootLayout.Id); string layoutComponent = concern + layout; string layoutComponentToLower = TextConverter.CamelCase(concern) + "-" + TextConverter.CamelCase(layout); #line default #line hidden this.Write(" "); #line 73 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutComponent)); #line default #line hidden this.Write("PageModule,\r\n"); #line 74 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(" IonicModule.forRoot("); #line 77 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(")\r\n ],\r\n providers: [\r\n { provide: Platform, useClass: PlatformM" + "ock },\r\n { provide: StatusBar, useClass: StatusBarMock },\r\n { prov" + "ide: SplashScreen, useClass: SplashScreenMock },\r\n"); #line 83 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (isLanguages) { #line default #line hidden this.Write(" { provide: TranslateService, useClass: TranslateServiceMock },\r\n"); #line 88 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(" { provide: NavController, useClass: NavMock },\r\n { provide: Title," + " useClass: TitleMock }\r\n ]\r\n }).compileComponents();\r\n }));\r\n\r\n before" + "Each(async() => {\r\n fixture = TestBed.createComponent("); #line 98 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(");\r\n component = fixture.componentInstance;\r\n });\r\n \r\n afterEach(() => {\r\n " + " fixture.destroy();\r\n component = null;\r\n });\r\n\r\n it(\'"); #line 107 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" Component: platform should be ready\', fakeAsync(() => {\r\n spy = spyOn(compone" + "nt._platform, \'ready\').and.callThrough();\r\n var app = new "); #line 109 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write("(\r\n"); #line 110 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (isLanguages) { #line default #line hidden this.Write(" component._translateService,\r\n"); #line 115 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } if (_isMenu) { #line default #line hidden this.Write(" component._events,\r\n"); #line 122 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(@" component._platform, component._statusBar, component._splashScreen, component._title ); app._nav = component._nav; flushMicrotasks(); expect(spy).toHaveBeenCalled(); spy.calls.mostRecent().returnValue.then((result) => { expect(result).toEqual('READY'); }); })); it('"); #line 138 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" Component: should set default style statusBar\', fakeAsync(() => {\r\n spy = spy" + "On(component._statusBar, \'styleDefault\').and.callThrough();\r\n var app = new "); #line 140 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write("(\r\n"); #line 141 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (isLanguages) { #line default #line hidden this.Write(" component._translateService,\r\n"); #line 146 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } if (_isMenu) { #line default #line hidden this.Write(" component._events,\r\n"); #line 153 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(@" component._platform, component._statusBar, component._splashScreen, component._title ); app._nav = component._nav; flushMicrotasks(); expect(spy).toHaveBeenCalled(); var result = spy.calls.mostRecent().returnValue; expect(result).toBeUndefined(); })); it('"); #line 168 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" Component: should hide splashscreen\', fakeAsync(() => {\r\n spy = spyOn(compone" + "nt._splashScreen, \'hide\').and.callThrough();\r\n var app = new "); #line 170 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write("(\r\n"); #line 171 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (isLanguages) { #line default #line hidden this.Write(" component._translateService,\r\n"); #line 176 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } if (_isMenu) { #line default #line hidden this.Write(" component._events,\r\n"); #line 183 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(@" component._platform, component._statusBar, component._splashScreen, component._title ); app._nav = component._nav; flushMicrotasks(); expect(spy).toHaveBeenCalled(); var result = spy.calls.mostRecent().returnValue; expect(result).toBeUndefined(); })); it('"); #line 198 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" Component: should set navigation root page\', fakeAsync(() => {\r\n spy = spyOn(" + "component._nav, \'setRoot\').and.callThrough();\r\n var app = new "); #line 200 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write("(\r\n"); #line 201 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (isLanguages) { #line default #line hidden this.Write(" component._translateService,\r\n"); #line 206 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } if (_isMenu) { #line default #line hidden this.Write(" component._events,\r\n"); #line 213 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(" component._platform,\r\n component._statusBar,\r\n component._splashS" + "creen,\r\n component._title\r\n );\r\n app._nav = component._nav;\r\n flus" + "hMicrotasks();\r\n expect(spy).toHaveBeenCalledWith(\r\n"); #line 224 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (_smartApp.Concerns.AsEnumerable() != null && _rootLayout != null && _rootLayout.Id != null && _rootConcern != null && _rootConcern.Id != null) { string concern = TextConverter.PascalCase(_rootConcern.Id); string layout = TextConverter.PascalCase(_rootLayout.Id); string layoutComponent = concern + layout; string layoutComponentToLower = TextConverter.CamelCase(concern) + "-" + TextConverter.CamelCase(layout); #line default #line hidden this.Write(" "); #line 232 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutComponent)); #line default #line hidden this.Write("\r\n"); #line 233 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(" );\r\n spy.calls.mostRecent().returnValue.then((result) => {\r\n expect(r" + "esult).toBe(true);\r\n });\r\n }));\r\n\r\n it(\'"); #line 242 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" Component: should set default language\', fakeAsync(() => {\r\n spy = spyOn(comp" + "onent._translateService, \'setDefaultLang\').and.callThrough();\r\n var app = new" + " "); #line 244 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write("(\r\n"); #line 245 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (isLanguages) { #line default #line hidden this.Write(" component._translateService,\r\n"); #line 250 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } if (_isMenu) { #line default #line hidden this.Write(" component._events,\r\n"); #line 257 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(@" component._platform, component._statusBar, component._splashScreen, component._title ); app._nav = component._nav; flushMicrotasks(); expect(spy).toHaveBeenCalled(); var result = spy.calls.mostRecent().returnValue; expect(result).toBeUndefined(); })); it('"); #line 272 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" Component: should use a language\', fakeAsync(() => {\r\n spy = spyOn(component." + "_translateService, \'use\').and.callThrough();\r\n var app = new "); #line 274 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write("(\r\n"); #line 275 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (isLanguages) { #line default #line hidden this.Write(" component._translateService,\r\n"); #line 280 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } if (_isMenu) { #line default #line hidden this.Write(" component._events,\r\n"); #line 287 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(@" component._platform, component._statusBar, component._splashScreen, component._title ); app._nav = component._nav; flushMicrotasks(); expect(spy).toHaveBeenCalled(); spy.calls.mostRecent().returnValue.subscribe((result) => { expect(result).toBeDefined(); }); })); it('"); #line 303 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" Component: should translate applicationTitle to test\', fakeAsync(() => {\r\n sp" + "y = spyOn(component._translateService, \'get\').and.callThrough();\r\n var app = " + "new "); #line 305 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write("(\r\n"); #line 306 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (isLanguages) { #line default #line hidden this.Write(" component._translateService,\r\n"); #line 311 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } if (_isMenu) { #line default #line hidden this.Write(" component._events,\r\n"); #line 318 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(@" component._platform, component._statusBar, component._splashScreen, component._title ); app._nav = component._nav; flushMicrotasks(); expect(spy).toHaveBeenCalledWith('applicationTitle'); spy.calls.mostRecent().returnValue.subscribe((result) => { expect(result).toEqual('test'); }); })); it('"); #line 334 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" Component: should set translated title\', fakeAsync(() => {\r\n spy = spyOn(comp" + "onent._title, \'setTitle\').and.callThrough();\r\n var app = new "); #line 336 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write("(\r\n"); #line 337 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" if (isLanguages) { #line default #line hidden this.Write(" component._translateService,\r\n"); #line 342 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } if (_isMenu) { #line default #line hidden this.Write(" component._events,\r\n"); #line 349 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden this.Write(@" component._platform, component._statusBar, component._splashScreen, component._title ); app._nav = component._nav; flushMicrotasks(); expect(spy).toHaveBeenCalledWith('test'); var result = spy.calls.mostRecent().returnValue; expect(result).toBeUndefined(); })); it('"); #line 364 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(" Component: should be created\', fakeAsync(() => {\r\n flushMicrotasks();\r\n ex" + "pect(component instanceof "); #line 366 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(").toBeTruthy();\r\n }));\r\n\r\n it(\'"); #line 369 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_smartApp.Id))); #line default #line hidden this.Write(@" Component: should set root on test route', fakeAsync(() => { spy = spyOn(component, 'selected').and.callThrough(); component.selected('test'); flushMicrotasks(); expect(spy).toHaveBeenCalledWith('test'); spy = spyOn(component._nav, 'setRoot').and.callThrough(); component.selected('test'); flushMicrotasks(); expect(spy).toHaveBeenCalledWith('test'); spy.calls.mostRecent().returnValue.then((result) => { expect(result).toBe(true); }); })); }); "); #line 383 "C:\Users\Temoe\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\AppComponentSpecTemplate.tt" } #line default #line hidden return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { #line 2 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" var entity = (EntityInfo)Model; var controllerName = TextConverter.PascalCase(entity.Id) + _controllerSuffix; var entityName = TextConverter.PascalCase(entity.Id) + _modelSuffix; var keyName = GetPrimaryKey(); #line default #line hidden this.Write("<?php\r\n\r\nnamespace App\\Http\\Controllers\\WebControllers;\r\n\r\nuse Illuminate\\Http\\Re" + "quest;\r\nuse App\\Http\\Controllers\\Controller;\r\n\r\nuse App\\Models\\"); #line 15 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write(";\r\n\r\nclass "); #line 17 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(controllerName)); #line default #line hidden this.Write(" extends Controller\r\n{\r\n\r\n /**\r\n * Display a listing of the resource.\r\n " + " *\r\n * @return \\Illuminate\\Http\\Response\r\n */\r\n public function ind" + "ex()\r\n {\r\n $items = "); #line 27 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("::all();\r\n return view(\""); #line 28 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(entity.Id))); #line default #line hidden this.Write(".index\")->withItems($items);\r\n }\r\n\r\n /**\r\n * Show the form for creating" + " a new resource.\r\n *\r\n * @return \\Illuminate\\Http\\Response\r\n */\r\n " + " public function create()\r\n {\r\n return view(\""); #line 38 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(entity.Id))); #line default #line hidden this.Write(@".create""); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $inputData = $request->input(); $newItem = new "); #line 51 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write(";\r\n"); #line 52 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" foreach (PropertyInfo property in entity.AllProperties()) { if (!property.IsKey) { string propertyName = TextConverter.CamelCase(property.Id); #line default #line hidden this.Write(" $newItem->"); #line 59 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyName)); #line default #line hidden this.Write(" = $inputData[\""); #line 59 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyName)); #line default #line hidden this.Write("\"];\r\n"); #line 60 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" } } #line default #line hidden this.Write(" $newItem->save();\r\n\r\n flash(\'"); #line 66 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(entity.Id)))); #line default #line hidden this.Write(" is created!\')->success();\r\n\r\n return redirect()->action(\'WebControllers\\"); #line 68 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(controllerName)); #line default #line hidden this.Write("@index\');\r\n }\r\n\r\n /**\r\n * Display the specified resource.\r\n *\r\n " + " * @param int $id\r\n * @return \\Illuminate\\Http\\Response\r\n */\r\n publ" + "ic function show($"); #line 77 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write(")\r\n {\r\n $item = "); #line 79 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("::where(\'"); #line 79 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write("\', $"); #line 79 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write(")->firstOrFail();\r\n\r\n if(!empty($_REQUEST[\'showdelete\']))\r\n {\r\n " + " return view(\""); #line 83 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(entity.Id))); #line default #line hidden this.Write(".delete\")->withItem($item);\r\n }\r\n\r\n return view(\""); #line 86 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(entity.Id))); #line default #line hidden this.Write(".show\")->withItem($item);\r\n }\r\n\r\n /**\r\n * Show the form for editing the" + " specified resource.\r\n *\r\n * @param int $id\r\n * @return \\Illuminat" + "e\\Http\\Response\r\n */\r\n public function edit($"); #line 95 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write(")\r\n {\r\n $item = "); #line 97 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("::where(\'"); #line 97 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write("\', $"); #line 97 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write(")->firstOrFail();\r\n\r\n return view(\""); #line 99 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(entity.Id))); #line default #line hidden this.Write(@".edit"")->withItem($item); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $"); #line 109 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write(")\r\n {\r\n $dataToUpdate = $request->input();\r\n\r\n $item = "); #line 113 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("::where(\'"); #line 113 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write("\', $"); #line 113 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write(")->firstOrFail();\r\n\r\n"); #line 115 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" foreach (PropertyInfo property in entity.AllProperties()) { if (!property.IsKey) { string propertyName = TextConverter.CamelCase(property.Id); #line default #line hidden this.Write(" $item->"); #line 122 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyName)); #line default #line hidden this.Write(" = $dataToUpdate[\""); #line 122 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyName)); #line default #line hidden this.Write("\"];\r\n"); #line 123 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" } } #line default #line hidden this.Write("\r\n $item->save();\r\n\r\n flash(\'"); #line 130 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(entity.Id)))); #line default #line hidden this.Write(" is updated!\')->success();\r\n\r\n return redirect()->action(\'WebControllers\\"); #line 132 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(controllerName)); #line default #line hidden this.Write("@index\');\r\n }\r\n\r\n /**\r\n * Remove the specified resource from storage.\r\n" + " *\r\n * @param int $id\r\n * @return \\Illuminate\\Http\\Response\r\n " + "*/\r\n public function destroy(Request $request, $"); #line 141 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write(")\r\n {\r\n $item = "); #line 143 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("::where(\'"); #line 143 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write("\', $"); #line 143 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write(")->firstOrFail();\r\n $item->delete();\r\n\r\n flash(\'"); #line 146 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(entity.Id)))); #line default #line hidden this.Write(" is deleted!\')->success();\r\n\r\n return redirect()->action(\'WebControllers\\"); #line 148 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Controllers\WebControllers\Templates\WebControllersTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(controllerName)); #line default #line hidden this.Write("@index\');\r\n }\r\n}"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\n"); this.Write(@"/* * You should add your licence here, here is an example : * * SonarQube, open source software quality management tool. * Copyright (C) 2008-2013 SonarSource * mailto:contact AT sonarsource DOT com * * SonarQube is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * SonarQube is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; "); #line 27 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (_viewModels.AsEnumerable() != null) { foreach (string viewModel in _viewModels.AsEnumerable()) { #line default #line hidden this.Write("import { "); #line 33 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(viewModel))); #line default #line hidden this.Write(" } from \'../viewModels/"); #line 33 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(viewModel))); #line default #line hidden this.Write("\';\r\n"); #line 34 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } } #line default #line hidden this.Write("\r\nimport { DataService } from \'./data.service\';\r\n\r\n"); #line 41 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (_api.Id != null) { #line default #line hidden this.Write("/**\r\n * class: "); #line 46 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_api.Id))); #line default #line hidden this.Write(".\r\n"); #line 47 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (_api.Description != null) { #line default #line hidden this.Write(" * "); #line 51 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_api.Description)); #line default #line hidden this.Write(".\r\n * This service is generated from API domain.\r\n"); #line 53 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" * You should add a description of your service here.\r\n * This service is generat" + "ed from API domain.\r\n"); #line 60 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } #line default #line hidden this.Write(" */\r\n@Injectable()\r\nexport class "); #line 65 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_api.Id))); #line default #line hidden this.Write(" {\r\n"); #line 66 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (_api.Actions.AsEnumerable() != null) { foreach (ApiActionInfo action in _api.Actions.AsEnumerable()) { if (action.Id != null && action.Url != null) { #line default #line hidden this.Write(" public _"); #line 74 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api = \'"); #line 74 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Url)); #line default #line hidden this.Write("\';\r\n"); #line 75 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } } } #line default #line hidden this.Write(" constructor(public _dataService: DataService){}\r\n"); #line 81 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (_api.Actions.AsEnumerable() != null) { foreach (ApiActionInfo action in _api.Actions.AsEnumerable()) { if (action.Id != null && action.Url != null && action.Type != null) { #line default #line hidden this.Write(" /**\r\n * method: "); #line 90 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write(".\r\n * You should add a description of your method here.\r\n * That method s" + "hould be used to connect with generated\r\n * backend API. You should add busi" + "ness logic inside.\r\n"); #line 94 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { string type = apiParameter.TypeScriptType(); #line default #line hidden this.Write(" * @param "); #line 103 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param `"); #line 103 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type)); #line default #line hidden this.Write("`.\r\n"); #line 104 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } } } if (action.ReturnType != null && action.ReturnType.Id != null) { #line default #line hidden this.Write(" * @returns `"); #line 111 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.ReturnType.Id))); #line default #line hidden this.Write(">`.\r\n"); #line 112 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } #line default #line hidden this.Write(" */\r\n public "); #line 116 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("(\r\n"); #line 117 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { string type = apiParameter.TypeScriptType(); if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 129 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param: "); #line 129 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type)); #line default #line hidden this.Write("\r\n"); #line 130 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 135 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param: "); #line 135 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type)); #line default #line hidden this.Write(",\r\n"); #line 136 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } } } } if (action.ReturnType != null && action.ReturnType.Id != null) { #line default #line hidden this.Write(" ): Observable<"); #line 145 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.ReturnType.Id))); #line default #line hidden this.Write("> {\r\n"); #line 146 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" ) {\r\n"); #line 152 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } switch (action.Type) { case "dataget": case "datalist": #line default #line hidden this.Write(" return this._dataService.get(\r\n"); #line 160 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" `${this._"); #line 164 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api}`,\r\n {\r\n"); #line 166 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 175 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": JSON.stringify("); #line 175 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param)\r\n"); #line 176 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 181 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": JSON.stringify("); #line 181 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param),\r\n"); #line 182 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } } } #line default #line hidden this.Write(" });\r\n"); #line 188 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" `${this._"); #line 193 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api}`,\r\n {});\r\n"); #line 195 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } break; case "datacreate": #line default #line hidden this.Write(" return this._dataService.post(\r\n"); #line 202 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" `${this._"); #line 206 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api}`,\r\n {\r\n"); #line 208 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 217 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": "); #line 217 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param\r\n"); #line 218 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 223 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": "); #line 223 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param,\r\n"); #line 224 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } } } #line default #line hidden this.Write(" },\r\n {});\r\n"); #line 231 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" `${this._"); #line 236 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api}`,\r\n {},\r\n {});\r\n"); #line 239 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } break; case "dataupdate": #line default #line hidden this.Write(" return this._dataService.put(\r\n"); #line 246 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" `${this._"); #line 250 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api}`,\r\n {\r\n"); #line 252 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 261 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": "); #line 261 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param\r\n"); #line 262 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 267 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": "); #line 267 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param,\r\n"); #line 268 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } } } #line default #line hidden this.Write(" },\r\n {});\r\n"); #line 275 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" `${this._"); #line 280 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api}`,\r\n {},\r\n {});\r\n"); #line 283 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } break; case "datadelete": #line default #line hidden this.Write(" return this._dataService.delete(\r\n"); #line 290 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" `${this._"); #line 294 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api}`,\r\n {\r\n"); #line 296 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 305 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": JSON.stringify("); #line 305 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param)\r\n"); #line 306 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 311 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": JSON.stringify("); #line 311 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param),\r\n"); #line 312 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } } } #line default #line hidden this.Write(" });\r\n"); #line 318 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } else { #line default #line hidden this.Write(" `${this._"); #line 323 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api}`,\r\n {});\r\n"); #line 325 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } break; default: break; } #line default #line hidden this.Write(" }\r\n"); #line 333 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } } } #line default #line hidden this.Write("}\r\n"); #line 339 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\API\Templates\ApiTemplate.tt" } #line default #line hidden return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { #line 2 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\DeleteTemplate.tt" var _entityInfo = (EntityInfo)Model; #line default #line hidden this.Write("@extends(\'layouts.master\')\r\n\r\n@section(\'content\')\r\n\r\n<div class=\"container-fluid " + "form-horizontal\">\r\n <div class=\"col-lg-12\">\r\n <div class=\"card\">\r\n " + " <div class=\"card-title\">\r\n\r\n <h4>"); #line 14 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\DeleteTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(_entityInfo.Id)))); #line default #line hidden this.Write(" - Delete Form</h4>\r\n </div>\r\n <div class=\"card-body\">\r\n " + " <h3>Are you sure you want to delete this?</h3>\r\n"); #line 18 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\DeleteTemplate.tt" foreach (var property in _entityInfo.AllProperties()) { #line default #line hidden this.Write(" <div class=\"row\">\r\n <label for=\""); #line 23 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\DeleteTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write("\" class = \"col-sm-2 col-form-label\">"); #line 23 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\DeleteTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(property.Id)))); #line default #line hidden this.Write("</label>\r\n <div class=\"col-sm-10 label-detail\">\r\n " + " {{$item->"); #line 25 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\DeleteTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write("}}\r\n </div>\r\n </div>\r\n"); #line 28 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\DeleteTemplate.tt" } #line default #line hidden this.Write(" <div class=\"row form-action\">\r\n <div class=\"col-s" + "m-10\">\r\n {!! Form::open([\'route\' => [\'"); #line 33 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\DeleteTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_entityInfo.Id))); #line default #line hidden this.Write(".destroy\', $item->"); #line 33 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\DeleteTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetPrimaryKey())); #line default #line hidden this.Write(@"], 'class' => 'form','method' => 'DELETE']) !!} {!! Form::submit('Delete', ['class' => 'btn btn-danger']) !!} {!! Form::close() !!} </div> </div> </div> </div> </div> </div> @endsection "); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { #line 2 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" var _entityInfo = (EntityInfo)Model; #line default #line hidden this.Write("@extends(\'layouts.master\')\r\n\r\n@section(\'content\')\r\n\r\n<div class=\"container-fluid " + "form-horizontal\">\r\n <div class=\"col-lg-12\">\r\n <div class=\"card\">\r\n " + " <div class=\"card-title\">\r\n <h4>"); #line 13 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(_entityInfo.Id)))); #line default #line hidden this.Write(" - Create Form</h4>\r\n </div>\r\n <div class=\"card-body\">\r\n " + " {!! Form::open([\'route\' => \'"); #line 16 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_entityInfo.Id.ToLower())); #line default #line hidden this.Write(".store\', \'class\' => \'form\',\'method\' => \'POST\']) !!}\r\n\r\n"); #line 18 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" foreach (var property in _entityInfo.AllProperties()) { if (!property.IsKey) { #line default #line hidden this.Write(" <div class=\"form-group\">\r\n {!! Form::label(\'"); #line 25 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write("\', \'"); #line 25 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(property.Id)))); #line default #line hidden this.Write("\') !!}\r\n"); #line 26 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" if (property.IsCollection) { #line default #line hidden this.Write(" {!! Form::"); #line 29 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(PHPType(property.Type))); #line default #line hidden this.Write("(\'"); #line 29 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write("[]\', null, [\'class\' => \'form-control\']) !!}\r\n"); #line 30 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" } else { #line default #line hidden this.Write(" {!! Form::"); #line 33 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(PHPType(property.Type))); #line default #line hidden this.Write("(\'"); #line 33 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write("\', null, [\'class\' => \'form-control\']) !!}\r\n"); #line 34 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" } #line default #line hidden this.Write(" </div>\r\n"); #line 38 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\CreateTemplate.tt" } } #line default #line hidden this.Write("\r\n {!! Form::submit(\'Save\', [\'class\' => \'btn btn-info\']) !!}\r\n\r\n " + " {!! Form::close() !!}\r\n </div>\r\n </div>\r\n </div>\r\n</di" + "v>\r\n\r\n@endsection \r\n"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("<?php\r\n\r\nuse Illuminate\\Support\\Facades\\Schema;\r\nuse Illuminate\\Database\\Schema\\B" + "lueprint;\r\nuse Illuminate\\Database\\Migrations\\Migration;\r\n\r\nclass "); #line 8 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_entityInfo.Id))); #line default #line hidden this.Write("sTable extends Migration\r\n{\r\n /**\r\n * Run the migrations.\r\n *\r\n * " + "@return void\r\n */\r\n public function up()\r\n {\r\n Schema::create(\'" + ""); #line 17 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_entityInfo.Id.ToLower())); #line default #line hidden this.Write("s\', function (Blueprint $table) {\r\n\r\n"); #line 19 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" foreach (var property in _entityInfo.AllProperties()) { if (property.IsKey) { #line default #line hidden this.Write(" $table->increments(\'"); #line 24 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write("\')->index();\r\n"); #line 25 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" } else { #line default #line hidden this.Write(" $table->"); #line 28 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(PHPType(property.Type))); #line default #line hidden this.Write("(\'"); #line 28 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write("\')"); #line 28 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" if (!property.IsRequired) { #line default #line hidden this.Write("->nullable()"); #line 28 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" } #line default #line hidden this.Write(";\r\n"); #line 29 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" } } #line default #line hidden this.Write("\r\n"); #line 34 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" if (_entityInfo.References != null && _entityInfo.References.Count > 0) { #line default #line hidden this.Write(" //Relations\r\n"); #line 39 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" foreach (var reference in _entityInfo.References) { if (reference.IsCollection) { #line default #line hidden this.Write(" // $table->integer(\'"); #line 45 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(reference.Id.ToLower())); #line default #line hidden this.Write("\')->unsinged();\r\n // $table->foreign(\'"); #line 46 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(reference.Id.ToLower())); #line default #line hidden this.Write("\')->references(\'"); #line 46 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(reference.ForeignKey.ToLower())); #line default #line hidden this.Write("\')->on(\'"); #line 46 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Type))); #line default #line hidden this.Write("s\');\r\n\r\n"); #line 48 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" } else { #line default #line hidden this.Write(" // $table->integer(\'"); #line 51 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(reference.Id.ToLower())); #line default #line hidden this.Write("\')->unsinged();\r\n // $table->foreign(\'"); #line 52 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(reference.Id.ToLower())); #line default #line hidden this.Write("\')->references(\'"); #line 52 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(reference.ForeignKey.ToLower())); #line default #line hidden this.Write("\')->on(\'"); #line 52 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Type))); #line default #line hidden this.Write("s\');\r\n\r\n"); #line 54 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" } } } #line default #line hidden this.Write(@" $table->timestamp('created_at')->nullable(); $table->timestamp('updated_at')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('"); #line 71 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelMigrationTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_entityInfo.Id.ToLower())); #line default #line hidden this.Write("s\');\r\n }\r\n}"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write(@" /* * You should add your licence here, here is an example : * * SonarQube, open source software quality management tool. * Copyright (C) 2008-2013 SonarSource * mailto:contact AT sonarsource DOT com * * SonarQube is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * SonarQube is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ "); #line 23 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" if (_concernId != null && _layout != null && _layout.Id != null) { string layout = TextConverter.PascalCase(_concernId) + TextConverter.PascalCase(_layout.Id); string layoutToLower = TextConverter.CamelCase(_concernId) + "-" + TextConverter.CamelCase(_layout.Id); #line default #line hidden this.Write("import { NgModule } from \'@angular/core\';\r\nimport { IonicPageModule } from \'ionic" + "-angular\';\r\n\r\nimport { "); #line 32 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layout)); #line default #line hidden this.Write(" } from \'./"); #line 32 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutToLower)); #line default #line hidden this.Write("\';\r\n"); #line 33 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" if (_languages.AsEnumerable() != null && _languages.AsEnumerable().Count() > 0) { #line default #line hidden this.Write("import { TranslateModule } from \'@ngx-translate/core\';\r\n"); #line 38 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" } if (_apiDomainServices.AsEnumerable() != null && _apiDomainServices.AsEnumerable().Count() > 0) { foreach (string service in _apiDomainServices.AsEnumerable()) { #line default #line hidden this.Write("import { "); #line 46 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(service))); #line default #line hidden this.Write(" } from \'../../../services/"); #line 46 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(service))); #line default #line hidden this.Write(".service\';\r\n"); #line 47 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" } } #line default #line hidden this.Write("\r\n/**\r\n * class: "); #line 53 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layout)); #line default #line hidden this.Write("PageModule.\r\n"); #line 54 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" if (_layout.Description != null) { #line default #line hidden this.Write(" * "); #line 58 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_layout.Description)); #line default #line hidden this.Write(".\r\n * This is the module of the current layout.\r\n * This module is generated from" + " Concerns domain.\r\n */\r\n"); #line 62 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" } else { #line default #line hidden this.Write(" * You should add a description of your\r\n * layout\'s module here.\r\n * This is the" + " module of the current layout.\r\n * This module is generated from Concerns domain" + ".\r\n */\r\n"); #line 72 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" } #line default #line hidden this.Write("@NgModule({\r\n declarations: [\r\n "); #line 77 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layout)); #line default #line hidden this.Write("\r\n ],\r\n imports: [\r\n"); #line 80 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" if (_languages.AsEnumerable() != null && _languages.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" TranslateModule.forChild(),\r\n"); #line 85 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" } #line default #line hidden this.Write(" IonicPageModule.forChild("); #line 88 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layout)); #line default #line hidden this.Write(")\r\n ],\r\n providers: [\r\n"); #line 91 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" if (_apiDomainServices.AsEnumerable() != null && _apiDomainServices.AsEnumerable().Count() > 0) { int lastIndex = _apiDomainServices.AsEnumerable().Count() - 1; int index = 0; foreach (string service in _apiDomainServices.AsEnumerable()) { if (index == lastIndex) { #line default #line hidden this.Write(" "); #line 101 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(service))); #line default #line hidden this.Write("\r\n"); #line 102 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 107 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(service))); #line default #line hidden this.Write(",\r\n"); #line 108 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" } index++; } } #line default #line hidden this.Write(" ]\r\n})\r\nexport class "); #line 116 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layout)); #line default #line hidden this.Write("PageModule {}\r\n"); #line 117 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutModuleTemplate.tt" } #line default #line hidden return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\n"); #line 2 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" if (_concern != null && _layout != null && _layout.Actions != null && _layout.Actions.Count > 0) { #line default #line hidden this.Write("/**\r\n * Constants for action: "); #line 6 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id)); #line default #line hidden this.Write("Actions\r\n*/\r\n"); #line 8 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" foreach (ActionInfo action in _layout.Actions.AsEnumerable()) { if (action.Id != null && action.Type != null) { if (!action.Type.ToLower().Equals("navigation")) { #line default #line hidden this.Write(" const "); #line 16 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 16 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_REQUEST = \'"); #line 16 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 16 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_REQUEST1\';\r\n const "); #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_SUCCESS = \'"); #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 17 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_SUCCESS1\';\r\n const "); #line 18 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 18 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_FAILURE = \'"); #line 18 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 18 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_FAILURE1\';\r\n\r\n"); #line 20 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" } else { string a = "Navigation"; } } } foreach (ActionInfo action in _layout.Actions.AsEnumerable()) { if (action.Id != null && action.Type != null) { if (!action.Type.ToLower().Equals("navigation")) { if (action.Id.ToLower().Equals("delete")) { action.Id = TextConverter.CamelCase(action.Id) + TextConverter.PascalCase(_concern.Id); } #line default #line hidden this.Write("export function "); #line 40 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("(){\r\n return function(dispatch){\r\n dispatch({ type: "); #line 42 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 42 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_REQUEST, isLoading: true});\r\n\r\n return "); #line 44 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_concern.Id))); #line default #line hidden this.Write("Api."); #line 44 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("()\r\n .then(response => response.json())\r\n .then(data =>{\r\n " + " dispatch({ type: "); #line 47 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 47 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_SUCCESS, "); #line 47 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_layout.Id))); #line default #line hidden this.Write(": data, isLoading: false });\r\n })\r\n .catch(error => {\r\n " + " dispatch({ type: "); #line 50 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_concern.Id.ToUpper())); #line default #line hidden this.Write("_"); #line 50 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Id.ToUpper())); #line default #line hidden this.Write("_FAILURE, error: error, isLoading: false });\r\n });\r\n };\r\n}\r\n"); #line 54 "D:\Working\Mobioos\Generators new changes\React-Native\GeneratorProject.ReactNative\GeneratorProject\Platforms\Frontend\ReactNative\Actions\Templates\ActionsTemplate.tt" } } } } #line default #line hidden return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\n"); this.Write(@"/* * You should add your licence here, here is an example : * * SonarQube, open source software quality management tool. * Copyright (C) 2008-2013 SonarSource * mailto:contact AT sonarsource DOT com * * SonarQube is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * SonarQube is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ "); #line 24 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (_concernId != null && _layout != null && _layout.Id != null) { string layout = TextConverter.PascalCase(_concernId) + TextConverter.PascalCase(_layout.Id); string layoutToLower = TextConverter.CamelCase(_concernId) + "-" + TextConverter.CamelCase(_layout.Id); string layoutPathToLower = TextConverter.CamelCase(_concernId) + "/" + TextConverter.CamelCase(_layout.Id); #line default #line hidden this.Write("import { Component } from \'@angular/core\';\r\nimport { IonicPage, NavController"); #line 32 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (_menu.AsEnumerable() != null && _menu.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(", Events"); #line 32 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } #line default #line hidden this.Write(" } from \'ionic-angular\';\r\n"); #line 33 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (_viewModels.AsEnumerable() != null && _viewModels.AsEnumerable().Count() > 0) { foreach (string viewModel in _viewModels.AsEnumerable()) { #line default #line hidden this.Write("import { "); #line 39 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(viewModel))); #line default #line hidden this.Write(" } from \'../../../viewModels/"); #line 39 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(viewModel))); #line default #line hidden this.Write("\';\r\n"); #line 40 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } } if (_apiDomainServices.AsEnumerable() != null && _apiDomainServices.AsEnumerable().Count() > 0) { #line default #line hidden this.Write("import { Observable } from \'rxjs\';\r\n"); #line 48 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" foreach (string service in _apiDomainServices.AsEnumerable()) { #line default #line hidden this.Write("import { "); #line 52 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(service))); #line default #line hidden this.Write(" } from \'../../../services/"); #line 52 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(service))); #line default #line hidden this.Write(".service\';\r\n"); #line 53 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } } if (_languages.AsEnumerable() != null && _languages.AsEnumerable().Count() > 0) { #line default #line hidden this.Write("import { LanguagePage } from \'../../language/language\';\r\n"); #line 61 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } #line default #line hidden this.Write("\r\n/**\r\n * class: "); #line 66 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layout)); #line default #line hidden this.Write(".\r\n"); #line 67 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (_layout.Description != null) { #line default #line hidden this.Write(" * "); #line 71 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_layout.Description)); #line default #line hidden this.Write(".\r\n * This is the component of that layout.\r\n * This component is generated from " + "Concerns domain.\r\n"); #line 74 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } else { #line default #line hidden this.Write(" * You should add a description of your\r\n * layout\'s component here.\r\n * This is " + "the component of the current layout.\r\n * This component is generated from Concer" + "ns domain.\r\n"); #line 83 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } #line default #line hidden this.Write(" */\r\n@IonicPage({\r\n name: \'"); #line 88 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutToLower)); #line default #line hidden this.Write("\',\r\n segment: \'"); #line 89 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutPathToLower)); #line default #line hidden this.Write("\'\r\n})\r\n@Component({\r\n selector: \'"); #line 92 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutToLower)); #line default #line hidden this.Write("\',\r\n templateUrl: \'"); #line 93 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layoutToLower)); #line default #line hidden this.Write(".html\'\r\n})\r\nexport class "); #line 95 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(layout)); #line default #line hidden this.Write(" {\r\n"); #line 96 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (_menu.AsEnumerable() != null && _menu.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" public _menu;\r\n"); #line 101 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } #line default #line hidden this.Write(" constructor(\r\n"); #line 105 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (_menu.AsEnumerable() != null && _menu.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" public _events: Events,\r\n"); #line 110 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } if (_apiDomainServices.AsEnumerable() != null && _apiDomainServices.AsEnumerable().Count() > 0) { foreach (string service in _apiDomainServices.AsEnumerable()) { #line default #line hidden this.Write(" public _"); #line 118 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(service))); #line default #line hidden this.Write(": "); #line 118 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(service))); #line default #line hidden this.Write(",\r\n"); #line 119 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } } #line default #line hidden this.Write(" public _nav: NavController\r\n ) {\r\n"); #line 125 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (_menu.AsEnumerable() != null && _menu.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" this._menu = [\r\n"); #line 130 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" string last = _menu.Keys.Last(); foreach (KeyValuePair <string, string> m in _menu.AsEnumerable()) { if (m.Key.Equals(last)) { #line default #line hidden this.Write(" { name: \'"); #line 137 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(m.Value)); #line default #line hidden this.Write("\', component: \'"); #line 137 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(m.Key)); #line default #line hidden this.Write("\' }\r\n"); #line 138 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } else { #line default #line hidden this.Write(" { name: \'"); #line 143 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(m.Value)); #line default #line hidden this.Write("\', component: \'"); #line 143 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(m.Key)); #line default #line hidden this.Write("\' },\r\n"); #line 144 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } } #line default #line hidden this.Write(" ];\r\n"); #line 149 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } #line default #line hidden this.Write(" }\r\n\r\n"); #line 154 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (_layout.Actions.AsEnumerable() != null) { foreach (ActionInfo action in _layout.Actions.AsEnumerable()) { switch (action.Type.ToLower()) { case "navigation": if (action.Target != null) { string[] actionTargetSplitted = action.Target.Split('.'); string targetedConcern = TextConverter.CamelCase(actionTargetSplitted[0]); string targetedLayout = TextConverter.CamelCase(actionTargetSplitted[1]); #line default #line hidden this.Write(" /**\r\n * method: on"); #line 169 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.Id))); #line default #line hidden this.Write("\r\n * That method is a navigation method.\r\n */\r\n public on"); #line 172 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.Id))); #line default #line hidden this.Write("() {\r\n this._nav.push(\'"); #line 173 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(targetedConcern + "-" + targetedLayout)); #line default #line hidden this.Write("\');\r\n }\r\n\r\n"); #line 176 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } break; case "method": #line default #line hidden this.Write(" /**\r\n * method: on"); #line 182 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.Id))); #line default #line hidden this.Write("\r\n * That method is a blank method.\r\n */\r\n public on"); #line 185 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.Id))); #line default #line hidden this.Write("() {\r\n // TO DO\r\n }\r\n\r\n"); #line 189 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" break; case "dataget": case "datalist": case "datacreate": case "dataupdate": case "datadelete": if (action.Api != null && _api != null) { string[] actionSplitted = action.Api.Split('.'); string apiService = actionSplitted[0]; string apiAction = actionSplitted[1]; foreach (ApiInfo api in _api.AsEnumerable()) { if (api.Id.ToLower().Equals(apiService.ToLower()) && api.Actions.AsEnumerable() != null) { foreach (ApiActionInfo apiA in api.Actions.AsEnumerable()) { if (apiA.Id.ToLower().Equals(apiAction.ToLower())) { #line default #line hidden this.Write(" /**\r\n * method: on"); #line 208 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.Id))); #line default #line hidden this.Write("\r\n * You should add a description of your method here.\r\n * that method is an " + "Api service call method.\r\n"); #line 211 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (apiA.Parameters.AsEnumerable() != null && apiA.Parameters.AsEnumerable().Count() > 0) { foreach (ApiParameterInfo apiParameter in apiA.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { string type = apiParameter.TypeScriptType(); #line default #line hidden this.Write(" * @param "); #line 220 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(" `"); #line 220 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type)); #line default #line hidden this.Write("`.\r\n"); #line 221 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } } } #line default #line hidden this.Write(" * @returns A `Subscription<any>`.\r\n */\r\n public on"); #line 228 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.Id))); #line default #line hidden this.Write("(\r\n"); #line 229 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (apiA.Parameters.AsEnumerable() != null && apiA.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = apiA.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in apiA.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { string type = apiParameter.TypeScriptType(); if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 241 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": "); #line 241 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type)); #line default #line hidden this.Write("\r\n"); #line 242 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 247 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": "); #line 247 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type)); #line default #line hidden this.Write(",\r\n"); #line 248 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } } } } #line default #line hidden this.Write(" ) {\r\n return this._"); #line 255 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(api.Id))); #line default #line hidden this.Write("."); #line 255 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiA.Id))); #line default #line hidden this.Write("(\r\n"); #line 256 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" if (apiA.Parameters.AsEnumerable() != null && apiA.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = apiA.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in apiA.Parameters.AsEnumerable()) { if (apiParameter.Id != null && apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 265 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("\r\n"); #line 266 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } else if (apiParameter.Id != null) { #line default #line hidden this.Write(" "); #line 271 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(",\r\n"); #line 272 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } } } #line default #line hidden this.Write(" ).subscribe();\r\n }\r\n\r\n"); #line 281 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } } } } } break; } } } if (_languages.AsEnumerable() != null && _languages.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" /**\r\n * method: onLanguage.\r\n * That method enables to enter language\r\n *" + " page with a button.\r\n */\r\n public onLanguage() {\r\n this._nav.push(Languag" + "ePage);\r\n }\r\n\r\n"); #line 304 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } if (_menu.AsEnumerable() != null && _menu.AsEnumerable().Count() > 0) { #line default #line hidden this.Write(" /**\r\n * method: ionViewWillEnter.\r\n * Base Ionic event which triggers\r\n *" + " global menu loading associated with\r\n * each layout\'s specific menu.\r\n */\r\n" + " public ionViewWillEnter() {\r\n this._events.publish(\'menu\', this._menu);\r\n " + "}\r\n"); #line 319 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } #line default #line hidden this.Write("}\r\n"); #line 323 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\Layout\Templates\LayoutComponentTemplate.tt" } #line default #line hidden return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("<?php\r\nnamespace App\\Models;\r\n\r\n"); #line 5 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" if (_entityInfo.BaseEntity == null) { #line default #line hidden this.Write("use Illuminate\\Database\\Eloquent\\Model;\r\n\r\nclass "); #line 11 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_entityInfo.Id)); #line default #line hidden #line 11 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelSuffix)); #line default #line hidden this.Write(" extends Model\r\n"); #line 12 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" } else { #line default #line hidden this.Write("class "); #line 17 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_entityInfo.Id)); #line default #line hidden #line 17 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelSuffix)); #line default #line hidden this.Write(" extends "); #line 17 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_entityInfo.Extends))); #line default #line hidden #line 17 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelSuffix)); #line default #line hidden this.Write("\r\n"); #line 18 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" } #line default #line hidden this.Write("{\r\n /**\r\n * The table associated with the model.\r\n */\r\n protected " + "$table = \'"); #line 25 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_entityInfo.Id.ToLower())); #line default #line hidden this.Write("s\';\r\n\r\n"); #line 27 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" if (_entityInfo.References != null && _entityInfo.References.Count > 0) { foreach (var reference in _entityInfo.References) { if (reference.IsCollection) { #line default #line hidden this.Write(" public function "); #line 35 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id))); #line default #line hidden this.Write("()\r\n {\r\n return $this->hasMany(\'"); #line 37 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelPath)); #line default #line hidden #line 37 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(reference.Type))); #line default #line hidden #line 37 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelSuffix)); #line default #line hidden this.Write("\');\r\n }\r\n\r\n"); #line 40 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" } else { #line default #line hidden this.Write(" public function "); #line 43 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(reference.Id))); #line default #line hidden this.Write("()\r\n {\r\n return $this->belongsTo(\'"); #line 45 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelPath)); #line default #line hidden #line 45 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(reference.Id))); #line default #line hidden #line 45 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_modelSuffix)); #line default #line hidden this.Write("\');\r\n }\r\n\r\n"); #line 48 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Models\Templates\ModelsTemplate.tt" } } } #line default #line hidden this.Write("}"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\n"); this.Write("import { Observable } from \'rxjs\';\r\n"); #line 4 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" if (_viewModels.AsEnumerable() != null) { foreach (string viewModel in _viewModels.AsEnumerable()) { #line default #line hidden this.Write("import { "); #line 10 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(viewModel))); #line default #line hidden this.Write(" } from \'../../src/viewModels/"); #line 10 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(viewModel))); #line default #line hidden this.Write("\';\r\n"); #line 11 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" } } if (_api.Id != null) { #line default #line hidden this.Write("export class "); #line 18 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_api.Id))); #line default #line hidden this.Write("Mock {\r\n"); #line 19 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" if (_api.Actions.AsEnumerable() != null) { foreach (ApiActionInfo action in _api.Actions.AsEnumerable()) { if (action.Id != null && action.Url != null && action.Type != null) { #line default #line hidden this.Write(" public "); #line 27 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("(\r\n"); #line 28 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { string type = apiParameter.TypeScriptType(); if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 40 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param: "); #line 40 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type)); #line default #line hidden this.Write("\r\n"); #line 41 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 46 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write("Param: "); #line 46 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(type)); #line default #line hidden this.Write(",\r\n"); #line 47 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" } } } } if (action.ReturnType != null && action.ReturnType.Id != null) { #line default #line hidden this.Write(" ): Observable<"); #line 56 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(action.ReturnType.Id))); #line default #line hidden this.Write("> {\r\n return Observable.of();\r\n }\r\n\r\n"); #line 60 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" } else { #line default #line hidden this.Write(" ): Observable<any> {\r\n return Observable.of();\r\n }\r\n\r\n"); #line 69 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" } } } } #line default #line hidden this.Write("}\r\n"); #line 76 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\MocksTemplate.tt" } #line default #line hidden return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { #line 2 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" var _entityInfo = (EntityInfo)Model; #line default #line hidden #line 5 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" var keyName = GetPrimaryKey(); #line default #line hidden this.Write("@extends(\'layouts.master\')\r\n\r\n@section(\'content\')\r\n\r\n<div class=\"container-fluid " + "form-horizontal\">\r\n <div class=\"col-lg-12\">\r\n <div class=\"card\">\r\n <div " + "class=\"card-title\">\r\n <h4>\r\n "); #line 15 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(_entityInfo.Id)))); #line default #line hidden this.Write(" - List Form</h4>\r\n <a class=\"btn btn-primary btn-sm float-right\" href=\"/"); #line 16 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_entityInfo.Id.ToLower())); #line default #line hidden this.Write("/create\">Create New</a>\r\n </div>\r\n <div class=\"card-body\">\r\n <di" + "v class=\"table-responsive\">\r\n <table class=\"table\">\r\n <thead" + ">\r\n <tr>\r\n"); #line 23 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" foreach (var property in _entityInfo.AllProperties()) { #line default #line hidden this.Write(" <th>"); #line 27 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(property.Id)))); #line default #line hidden this.Write("</th>\r\n"); #line 28 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" } #line default #line hidden this.Write(" </tr>\r\n </thead>\r\n <tbody>\r\n @fore" + "lse ($items as $item)\r\n <tr>\r\n"); #line 36 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" foreach (var property in _entityInfo.AllProperties()) { #line default #line hidden this.Write(" <td>{{$item->"); #line 40 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(property.Id))); #line default #line hidden this.Write("}}</td>\r\n"); #line 41 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" } #line default #line hidden this.Write(" <td>\r\n <a class=\"btn btn-info btn-sm\" href" + "=\"/"); #line 45 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_entityInfo.Id.ToLower())); #line default #line hidden this.Write("/{{$item->"); #line 45 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write("}}\">Details</a>\r\n <a class=\"btn btn-warning btn-sm\" href=\"/"); #line 46 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_entityInfo.Id.ToLower())); #line default #line hidden this.Write("/{{$item->"); #line 46 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write("}}/edit\">Edit</a>\r\n <a class=\"btn btn-danger btn-sm\" href=\"/" + ""); #line 47 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(_entityInfo.Id.ToLower())); #line default #line hidden this.Write("/{{$item->"); #line 47 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(keyName)); #line default #line hidden this.Write("}}?showdelete=true\">Delete</a>\r\n </td>\r\n </tr>\r\n " + " @empty \r\n <p>There no <strong>"); #line 51 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(_entityInfo.Id)))); #line default #line hidden this.Write("</strong> defined. Click on <strong>Create New</strong> button to create new "); #line 51 "D:\Working\Mobioos\Generators new changes\PHP-LARAVEL\PHPGeneratorLaravel\GeneratorProject\Platforms\Backend\PHP\Views\Templates\IndexTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Helper.WordSeperator(TextConverter.PascalCase(_entityInfo.Id)))); #line default #line hidden this.Write(".</p>\r\n @endforelse\r\n </tbody>\r\n </table>\r\n " + " </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@endsection "); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("\r\n"); this.Write("import { Observable } from \'rxjs\';\r\nimport { fakeAsync, flushMicrotasks, TestBed " + "} from \'@angular/core/testing\';\r\nimport { DataServiceMock } from \'../../test-con" + "fig/mocks/dataServiceMock\';\r\nimport { DataService } from \'./data.service\';\r\nimpo" + "rt { "); #line 7 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_api.Id))); #line default #line hidden this.Write(" } from \'./"); #line 7 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_api.Id))); #line default #line hidden this.Write(".service\';\r\n"); #line 8 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" if (_viewModels.AsEnumerable() != null) { foreach (string viewModel in _viewModels.AsEnumerable()) { #line default #line hidden this.Write("import { "); #line 14 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(viewModel))); #line default #line hidden this.Write(" } from \'../viewModels/"); #line 14 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(viewModel))); #line default #line hidden this.Write("\';\r\n"); #line 15 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } } #line default #line hidden this.Write("\r\ndescribe(\'"); #line 20 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_api.Id))); #line default #line hidden this.Write(" service\', () => {\r\n let "); #line 21 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_api.Id))); #line default #line hidden this.Write("Spy: "); #line 21 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_api.Id))); #line default #line hidden this.Write(";\r\n let spy: jasmine.Spy;\r\n\r\n beforeEach(() => {\r\n TestBed.configureTestingM" + "odule({\r\n providers: [\r\n "); #line 27 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_api.Id))); #line default #line hidden this.Write(",\r\n { provide: DataService, useClass: DataServiceMock }\r\n ]\r\n });\r" + "\n "); #line 31 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_api.Id))); #line default #line hidden this.Write("Spy = TestBed.get("); #line 31 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_api.Id))); #line default #line hidden this.Write(");\r\n });\r\n"); #line 33 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" if (_api != null && _api.Actions.AsEnumerable() != null) { foreach (ApiActionInfo action in _api.Actions.AsEnumerable()) { if (action.Id != null && action.Url != null && action.Type != null) { #line default #line hidden this.Write(" it(\'"); #line 41 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.PascalCase(_api.Id))); #line default #line hidden this.Write(" service: should "); #line 41 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("\', fakeAsync(() => {\r\n const "); #line 42 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api = \'"); #line 42 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(action.Url)); #line default #line hidden this.Write("\';\r\n spy = spyOn("); #line 43 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_api.Id))); #line default #line hidden this.Write("Spy, \'"); #line 43 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("\').and.callThrough();\r\n "); #line 44 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_api.Id))); #line default #line hidden this.Write("Spy."); #line 44 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("(\r\n"); #line 45 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { string type = apiParameter.TypeScriptType(); string value = getValueFromType(type); if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 58 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value)); #line default #line hidden this.Write("\r\n"); #line 59 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 64 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value)); #line default #line hidden this.Write(",\r\n"); #line 65 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } } } } #line default #line hidden this.Write(" );\r\n flushMicrotasks();\r\n expect(spy).toHaveBeenCalledWith(\r\n"); #line 74 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { string type = apiParameter.TypeScriptType(); string value = getValueFromType(type); if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 87 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value)); #line default #line hidden this.Write("\r\n"); #line 88 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 93 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value)); #line default #line hidden this.Write(",\r\n"); #line 94 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } } } } #line default #line hidden this.Write(" );\r\n spy = spyOn("); #line 101 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_api.Id))); #line default #line hidden this.Write("Spy._dataService, \'"); #line 101 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(ConvertActionType(action.Type))); #line default #line hidden this.Write("\').and.callThrough();\r\n "); #line 102 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(_api.Id))); #line default #line hidden this.Write("Spy."); #line 102 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("(\r\n"); #line 103 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { string type = apiParameter.TypeScriptType(); string value = getValueFromType(type); if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 116 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value)); #line default #line hidden this.Write("\r\n"); #line 117 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 122 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value)); #line default #line hidden this.Write(",\r\n"); #line 123 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } } } } #line default #line hidden this.Write(" );\r\n flushMicrotasks();\r\n"); #line 131 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" switch (action.Type.ToLower()) { case "dataget": case "datalist": case "datadelete": #line default #line hidden this.Write(" expect(spy).toHaveBeenCalledWith(\r\n `${"); #line 137 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api}`,\r\n {\r\n"); #line 139 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { string type = apiParameter.TypeScriptType(); string value = getValueFromType(type); if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 152 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": JSON.stringify("); #line 152 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value)); #line default #line hidden this.Write(")\r\n"); #line 153 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 158 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": JSON.stringify("); #line 158 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value)); #line default #line hidden this.Write("),\r\n"); #line 159 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } } } } #line default #line hidden this.Write(" }\r\n );\r\n"); #line 167 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" break; default: #line default #line hidden this.Write(" expect(spy).toHaveBeenCalledWith(\r\n `${"); #line 172 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(action.Id))); #line default #line hidden this.Write("Api}`,\r\n {\r\n"); #line 174 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" if (action.Parameters.AsEnumerable() != null && action.Parameters.AsEnumerable().Count() > 0) { ApiParameterInfo last = action.Parameters.AsEnumerable().Last(); foreach (ApiParameterInfo apiParameter in action.Parameters.AsEnumerable()) { if (apiParameter.Id != null) { string type = apiParameter.TypeScriptType(); string value = getValueFromType(type); if (apiParameter.Equals(last)) { #line default #line hidden this.Write(" "); #line 187 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": "); #line 187 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value)); #line default #line hidden this.Write("\r\n"); #line 188 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } else { #line default #line hidden this.Write(" "); #line 193 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(TextConverter.CamelCase(apiParameter.Id))); #line default #line hidden this.Write(": "); #line 193 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value)); #line default #line hidden this.Write(",\r\n"); #line 194 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } } } } #line default #line hidden this.Write(" },\r\n {}\r\n );\r\n"); #line 203 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" break; } #line default #line hidden this.Write(" var result = spy.calls.mostRecent().returnValue;\r\n expect(result instanceo" + "f Observable).toBeTruthy();\r\n }));\r\n\r\n"); #line 211 "C:\Users\PC\Documents\Gits\Ionic-framework\GeneratorProject.IonicFrameworkCodeSamples\GeneratorProject\Platforms\Frontend\Ionic\UnitTests\Templates\ServiceSpecTemplate.tt" } } } #line default #line hidden this.Write("});\r\n"); return(this.GenerationEnvironment.ToString()); }