Beispiel #1
0
 /// <summary>
 /// Formats the anon type
 /// </summary>
 /// <param name="anonymousType"></param>
 /// <returns></returns>
 public override string FormatAnonymousType(AnonymousTypeDescriptor anonymousType)
 {
     return(TypeScriptHelper.BuildAnonymousType(anonymousType.Properties.ToDictionary(
                                                    pr => pr.Name,
                                                    pr => pr.Type.FormatType(this))
                                                ));
 }
Beispiel #2
0
 /// <summary>
 /// formats a dictionary type
 /// </summary>
 /// <param name="dictionaryType"></param>
 /// <returns></returns>
 public override string FormatDictionaryType(DictionaryTypeDescriptor dictionaryType)
 {
     return(TypeScriptHelper.FormatDictionaryType(dictionaryType.Key.FormatType(this), dictionaryType.Value.FormatType(this)));
 }