コード例 #1
0
        static void Main(string[] args)
        {
            Core22Configurator.Configure();
            var outputPath = args
                             .SkipWhile(a => a != "-o")
                             .Skip(1)
                             .FirstOrDefault();

            if (string.IsNullOrEmpty(outputPath))
            {
                throw new ArgumentException("Must provide value for output file '-o <output file path>'");
            }
            Console.WriteLine(outputPath);
            TeeSquareWebApi.GenerateForAssemblies(typeof(OtherController).Assembly)
            .Configure(options =>
            {
                options.ReflectMethods = type =>
                                         type.IsInterface && (type.Namespace?.StartsWith("TeeSquare") ?? false);
            })
            .AddTypes(typeof(IApplicationHubClient), typeof(IApplicationHubServer))
            .WriteToFile(outputPath);
        }
コード例 #2
0
ファイル: Setup.cs プロジェクト: pleb/TeeSquare
 public void GlobalSetup()
 {
     Core22Configurator.Configure();
 }