public CurrentFileMembersAsFlatModule
            (CurrentFileMembersHandler handler) {

            Post["/currentfilemembersasflat"] = x =>
            {
                var req = this.Bind<CurrentFileMembersRequest>();
                var members = handler.GetCurrentFileMembersAsFlat(req);
                return Response.AsJson(members);
            };
        }
Exemple #2
0
 public CurrentFileMembersAsTreeModule
     (CurrentFileMembersHandler handler)
 {
     Post["/currentfilemembersastree"] = x =>
     {
         var req     = this.Bind <CurrentFileMembersRequest>();
         var members = handler.GetCurrentFileMembersAsTree(req);
         return(Response.AsJson(members));
     };
 }
        public CurrentFileTopLevelTypesModule(CurrentFileMembersHandler handler) {
            Post["/currentfiletopleveltypes"] = x => {
                var req = this.Bind<CurrentFileMembersRequest>();
                var members = handler.GetCurrentFileMembersAsTree(req);

                IEnumerable<QuickFix> topLevelTypeDefinitions =
                    members.TopLevelTypeDefinitions
                    .Select(m => m.Location);

                return Response.AsJson(topLevelTypeDefinitions);
            };
        }
        public CurrentFileTopLevelTypesModule(CurrentFileMembersHandler handler)
        {
            Post["CurrentFileTopLevelTypes", "/currentfiletopleveltypes"] = x => {
                var req     = this.Bind <CurrentFileMembersRequest>();
                var members = handler.GetCurrentFileMembersAsTree(req);

                IEnumerable <QuickFix> topLevelTypeDefinitions =
                    members.TopLevelTypeDefinitions
                    .Select(m => m.Location);

                return(Response.AsJson(topLevelTypeDefinitions));
            };
        }