Пример #1
0
 public static CSharpInterface FromMethods(ApiMethod[] methods)
 {
     return(new CSharpInterface
     {
         Name = 'I' + methods[0].Category.ToBeautifiedName(),
         Methods = methods.SelectMany(m => CSharpMethod.FromMethod(m, true)).ToArray()
     });
 }
Пример #2
0
        public static CSharpClass FromMethods(ApiMethod[] methods)
        {
            var name = methods[0].Category.ToBeautifiedName();

            return(new CSharpClass
            {
                Name = name,
                Interface = 'I' + name,
                Methods = methods.SelectMany(m => CSharpMethod.FromMethod(m, false)).ToArray(),
                Properties = Array.Empty <CSharpProperty>(),
                NestedEnums = Array.Empty <CSharpEnum>(),
            });
        }