Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

丁松杰 / Pole

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • Pole
  • src
  • Pole.Sagas.Server
  • PoleSagasServerApplicationBuilderExte...
Find file
BlameHistoryPermalink
  • dingsongjie's avatar
    注册 grpc 服务 · 32de2b90
    dingsongjie committed 5 years ago
    32de2b90
PoleSagasServerApplicationBuilderExtensions.cs 560 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
using Microsoft.AspNetCore.Builder;
using Pole.Sagas.Server.Services;
using System;
using System.Collections.Generic;
using System.Text;

namespace Pole.Sagas.Server
{
    public static class PoleSagasServerApplicationBuilderExtensions
    {
        public static IApplicationBuilder UserPoleSagasServer(IApplicationBuilder builder)
        {
            builder.UseRouting();

            builder.UseEndpoints(endpoints =>
            {
                endpoints.MapGrpcService<SagaService>();
            });
            return builder;
        }
    }
}