private string GetWebApiCodeTypeScriptDeclaration(List <SystemForm> processForms, bool isDebugForm, bool isJsWebApi, bool isDebugWebApi, string jsFormVersion) { if (jsFormVersion == null || jsFormVersion == string.Empty) { var jsIntellisense = new JsTypeScriptDeclaration(CrmService) { ProcessForms = processForms, IsDebugForm = isDebugForm, IsDebugWebApi = isDebugWebApi, IsJsWebApi = isJsWebApi, ProjectName = ProjectName, EntityName = EntityName, Fields = Fields, Processes = Processes }; return(jsIntellisense.Intellisense); } else { var jsIntellisense = new JsTypeScriptDeclaration2(CrmService) { ProcessForms = processForms, IsDebugForm = isDebugForm, IsDebugWebApi = isDebugWebApi, IsJsWebApi = isJsWebApi, ProjectName = ProjectName, EntityName = EntityName, Fields = Fields, Processes = Processes }; return(jsIntellisense.Intellisense); } }
private string GetTypeScriptDeclaration(List <SystemForm> processForms, bool isDebugForm, bool isJsWebApi, bool isDebugWebApi) { if (isJsWebApi) { foreach (var crmAttribute in Fields) { if (crmAttribute.FieldType == AttributeTypeCode.Lookup || crmAttribute.FieldType == AttributeTypeCode.Customer) { crmAttribute.LogicalCollectionName = GetLogicalCollectionName(crmAttribute); crmAttribute.NavigationPropertyName = GetNavigationPropertyName(crmAttribute); } } } var jsIntellisense = new JsTypeScriptDeclaration(CrmService) { ProcessForms = processForms, IsDebugForm = isDebugForm, IsDebugWebApi = isDebugWebApi, IsJsWebApi = isJsWebApi, ProjectName = ProjectName, EntityName = EntityName, Fields = Fields, Processes = Processes }; return(jsIntellisense.Intellisense); }