示例#1
0
 private void EstablishDependencies()
 {
     this._ngDependencies = new List <string>()
     {
         //atm only the resource/service is a dep.
         CSharpToNgControllerHelpers.GetServiceName(this._controllerType.Name)
     };
 }
 public AngularResourceViewModel(EnvDTE.CodeType controllerType)
 {
     this._controllerType    = controllerType;
     this._controllerMethods = controllerType.Members
                               .Cast <EnvDTE.CodeElement>().Where(ce => ce.Kind == EnvDTE.vsCMElement.vsCMElementFunction)
                               .Cast <EnvDTE.CodeFunction>().Where(cf => cf.Access == EnvDTE.vsCMAccess.vsCMAccessPublic);
     this.ServiceName = CSharpToNgControllerHelpers.GetServiceName(_controllerType.Name);
     this.Methods     = this._controllerMethods.Select(cf => new WebApiControllerMethodViewModel(cf));
     this.EstablishDependencies();
 }