public static ApiSyntaxBuildOutput FromModel(SyntaxDetailViewModel model, string[] supportedLanguages) { if (model == null) { return(null); } return(new ApiSyntaxBuildOutput { Content = ApiBuildOutputUtility.TransformToLanguagePairList(model.Content, model.Contents, supportedLanguages), Parameters = model.Parameters?.Select(ApiParameterBuildOutput.FromModel).ToList(), TypeParameters = model.TypeParameters?.Select(ApiParameterBuildOutput.FromModel).ToList(), Return = ApiParameterBuildOutput.FromModel(model.Return), }); }
public static ApiSyntaxBuildOutput FromModel(SyntaxDetailViewModel model, string[] supportedLanguages) { if (model == null) { return(null); } return(new ApiSyntaxBuildOutput { Content = GetContents(model.Content, model.ContentForCSharp, model.ContentForVB, supportedLanguages), Parameters = model.Parameters?.Select(s => ApiParameterBuildOutput.FromModel(s)).ToList(), TypeParameters = model.TypeParameters?.Select(s => ApiParameterBuildOutput.FromModel(s)).ToList(), Return = ApiParameterBuildOutput.FromModel(model.Return), }); }
public static ApiSyntaxBuildOutput FromModel(SyntaxDetailViewModel model, Dictionary <string, ApiReferenceBuildOutput> references, string[] supportedLanguages) { if (model == null) { return(null); } return(new ApiSyntaxBuildOutput { Content = ApiBuildOutputUtility.TransformToLanguagePairList(model.Content, model.Contents, supportedLanguages), Parameters = model.Parameters?.Select(s => ApiParameterBuildOutput.FromModel(s, references, supportedLanguages)).ToList(), TypeParameters = model.TypeParameters?.Select(ApiParameterBuildOutput.FromModel).ToList(), Return = ApiParameterBuildOutput.FromModel(model.Return, references, supportedLanguages), _needExpand = false, }); }
public static ApiSyntaxBuildOutput FromModel(SyntaxDetailViewModel model, Dictionary <string, ApiReferenceBuildOutput> references, string[] supportedLanguages) { if (model == null) { return(null); } return(new ApiSyntaxBuildOutput { Content = GetContents(model.Content, model.ContentForCSharp, model.ContentForVB, supportedLanguages), Parameters = model.Parameters?.Select(s => ApiParameterBuildOutput.FromModel(s, references, supportedLanguages)).ToList(), TypeParameters = model.TypeParameters?.Select(s => ApiParameterBuildOutput.FromModel(s)).ToList(), Return = ApiParameterBuildOutput.FromModel(model.Return, references, supportedLanguages), _isExpanded = true, }); }