public static global::Grpc.Core.ServerServiceDefinition BindService(UserServiceBase serviceImpl) { return(global::Grpc.Core.ServerServiceDefinition.CreateBuilder() .AddMethod(Method_GetUsers, serviceImpl.GetUsers) .AddMethod(Method_HasPermission, serviceImpl.HasPermission) .Build()); }
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static void BindService(grpc::ServiceBinderBase serviceBinder, UserServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_GetOneUser, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::gRPCLib.ReqsGetOneUser, global::gRPCLib.RespGetOneUser>(serviceImpl.GetOneUser)); serviceBinder.AddMethod(__Method_GetAllUser, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::gRPCLib.ReqsNull, global::gRPCLib.RespGetAllUser>(serviceImpl.GetAllUser)); serviceBinder.AddMethod(__Method_Save, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::gRPCLib.User, global::gRPCLib.SaveResult>(serviceImpl.Save)); serviceBinder.AddMethod(__Method_Delete, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::gRPCLib.User, global::gRPCLib.SaveResult>(serviceImpl.Delete)); }
public static void BindService(grpc::ServiceBinderBase serviceBinder, UserServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_GetUsers, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Proto.UserRpc.UserRequest, global::Proto.UserRpc.UserResponse>(serviceImpl.GetUsers)); serviceBinder.AddMethod(__Method_DeleteUser, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Proto.UserRpc.UserRequest, global::Proto.UserRpc.FailIdsResponse>(serviceImpl.DeleteUser)); serviceBinder.AddMethod(__Method_UpdateUser, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Proto.UserRpc.UpdateUserRequest, global::Proto.UserRpc.FailIdsResponse>(serviceImpl.UpdateUser)); serviceBinder.AddMethod(__Method_Insert, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Proto.UserRpc.MutiUserRequest, global::Proto.UserRpc.UserResponse>(serviceImpl.Insert)); }
private static string[] _filesToExclude = new string[] { "emptyfile.txt", "_installtest.txt" }; // installer/publish files /// <summary> /// Constructor for the file manager. /// </summary> /// <remarks>This action requires editor rights.</remarks> public FileManagerController(ApplicationSettings settings, UserServiceBase userManager, IUserContext context, SettingsService settingsService, AttachmentFileHandler attachment) : base(settings, userManager, context, settingsService) { _attachmentHandler = attachment; _attachmentPathUtil = new AttachmentPathUtil(settings); }
/// <summary>Creates service definition that can be registered with a server</summary> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static grpc::ServerServiceDefinition BindService(UserServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetUser, serviceImpl.GetUser) .AddMethod(__Method_GetUsers, serviceImpl.GetUsers) .AddMethod(__Method_Add, serviceImpl.Add).Build()); }
public WikiController(ApplicationSettings settings, UserServiceBase userManager, PageService pageService, IUserContext context, SettingsService settingsService, SearchService searchService) : base(settings, userManager, context, settingsService) { PageService = pageService; _searchService = searchService; }
public void Should_Load_Custom_UserService() { // Arrange ApplicationSettings applicationSettings = new ApplicationSettings(); applicationSettings.UserServiceType = "Roadkill.Tests.UserServiceStub"; DependencyManager iocSetup = new DependencyManager(applicationSettings); // Put the UserServiceStub in a new assembly so we can test it's loaded string tempFilename = Path.GetFileName(Path.GetTempFileName()) + ".dll"; string thisAssembly = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Roadkill.Tests.dll"); string pluginSourceDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Plugins", "UserService"); string destPlugin = Path.Combine(pluginSourceDir, tempFilename); if (!Directory.Exists(pluginSourceDir)) { Directory.CreateDirectory(pluginSourceDir); } File.Copy(thisAssembly, destPlugin, true); // Act iocSetup.Configure(); // Assert UserServiceBase userManager = ObjectFactory.GetInstance <UserServiceBase>(); Assert.That(userManager.GetType().FullName, Is.EqualTo("Roadkill.Tests.UserServiceStub")); }
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static void BindService(grpc::ServiceBinderBase serviceBinder, UserServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_Create, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.User, global::MockSite.Message.ResponseBase>(serviceImpl.Create)); serviceBinder.AddMethod(__Method_GetAll, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.Empty, global::MockSite.Message.Users>(serviceImpl.GetAll)); serviceBinder.AddMethod(__Method_Get, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.UserCode, global::MockSite.Message.User>(serviceImpl.Get)); serviceBinder.AddMethod(__Method_Update, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.User, global::MockSite.Message.ResponseBase>(serviceImpl.Update)); serviceBinder.AddMethod(__Method_Delete, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.UserCode, global::MockSite.Message.ResponseBase>(serviceImpl.Delete)); }
public ControllerBase(ApplicationSettings settings, UserServiceBase userService, IUserContext context, SettingsService settingsService) { ApplicationSettings = settings; UserService = userService; Context = context; SettingsService = settingsService; }
public static grpc::ServerServiceDefinition BindService(UserServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetUsers, serviceImpl.GetUsers) .AddMethod(__Method_DeleteUser, serviceImpl.DeleteUser) .AddMethod(__Method_UpdateUser, serviceImpl.UpdateUser) .AddMethod(__Method_Insert, serviceImpl.Insert).Build()); }
/// <summary>Creates service definition that can be registered with a server</summary> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static grpc::ServerServiceDefinition BindService(UserServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetOneUser, serviceImpl.GetOneUser) .AddMethod(__Method_GetAllUser, serviceImpl.GetAllUser) .AddMethod(__Method_Save, serviceImpl.Save) .AddMethod(__Method_Delete, serviceImpl.Delete).Build()); }
public SettingsController(ApplicationSettings settings, UserServiceBase userManager, SettingsService settingsService, IUserContext context, SiteCache siteCache, ConfigReaderWriter configReaderWriter) : base(settings, userManager, context, settingsService) { _settingsService = settingsService; _siteCache = siteCache; _configReaderWriter = configReaderWriter; }
public HomeController(ApplicationSettings settings, UserServiceBase userManager, MarkupConverter markupConverter, PageService pageService, SearchService searchService, IUserContext context, SettingsService settingsService) : base(settings, userManager, context, settingsService) { _markupConverter = markupConverter; _searchService = searchService; PageService = pageService; }
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static void BindService(grpc::ServiceBinderBase serviceBinder, UserServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_Get, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Shares.Core.Services.GetUserRequest, global::Shares.Core.Services.GetUserResponse>(serviceImpl.Get)); serviceBinder.AddMethod(__Method_List, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Shares.Core.Services.GetUsersRequest, global::Shares.Core.Services.GetUsersResponse>(serviceImpl.List)); serviceBinder.AddMethod(__Method_Create, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Shares.Core.Services.CreateUserRequest, global::Shares.Core.Services.CreateUserResponse>(serviceImpl.Create)); serviceBinder.AddMethod(__Method_Update, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Shares.Core.Services.UpdateUserRequest, global::Shares.Core.Services.UpdateUserResponse>(serviceImpl.Update)); serviceBinder.AddMethod(__Method_ChangePassword, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Shares.Core.Services.ChangePasswordRequest, global::Shares.Core.Services.ChangePasswordResponse>(serviceImpl.ChangePassword)); }
public RelController(ApplicationSettings settings, UserServiceBase userManager, SettingsService settingsService, IRelService relService, SearchService searchService, PageHistoryService historyService, IUserContext context) : base(settings, userManager, context, settingsService) { _settingsService = settingsService; _relService = relService; }
public UserController(ApplicationSettings settings, UserServiceBase userManager, IUserContext context, SettingsService settingsService, SignupEmail signupEmail, ResetPasswordEmail resetPasswordEmail) : base(settings, userManager, context, settingsService) { _signupEmail = signupEmail; _resetPasswordEmail = resetPasswordEmail; }
public CacheController(ApplicationSettings settings, UserServiceBase userService, SettingsService settingsService, IUserContext context, ListCache listCache, PageViewModelCache pageViewModelCache, SiteCache siteCache) : base(settings, userService, context, settingsService) { _listCache = listCache; _pageViewModelCache = pageViewModelCache; _siteCache = siteCache; }
/// <summary>Creates service definition that can be registered with a server</summary> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static ServerServiceDefinition BindService(UserServiceBase serviceImpl) { return(ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetByUserId, serviceImpl.GetByUserId) .AddMethod(__Method_GetAll, serviceImpl.GetAll) .AddMethod(__Method_Save, serviceImpl.Save) .AddMethod(__Method_SaveAll, serviceImpl.SaveAll) .AddMethod(__Method_AddImage, serviceImpl.AddImage).Build()); }
/// <summary>Creates service definition that can be registered with a server</summary> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static grpc::ServerServiceDefinition BindService(UserServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Create, serviceImpl.Create) .AddMethod(__Method_GetAll, serviceImpl.GetAll) .AddMethod(__Method_Get, serviceImpl.Get) .AddMethod(__Method_Update, serviceImpl.Update) .AddMethod(__Method_Delete, serviceImpl.Delete).Build()); }
/// <summary>Creates service definition that can be registered with a server</summary> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static grpc::ServerServiceDefinition BindService(UserServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Get, serviceImpl.Get) .AddMethod(__Method_List, serviceImpl.List) .AddMethod(__Method_Create, serviceImpl.Create) .AddMethod(__Method_Update, serviceImpl.Update) .AddMethod(__Method_ChangePassword, serviceImpl.ChangePassword).Build()); }
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static void BindService(grpc::ServiceBinderBase serviceBinder, UserServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_Create, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.CreateUserMessage, global::MockSite.Message.User>(serviceImpl.Create)); serviceBinder.AddMethod(__Method_GetAll, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.QueryUsersMessage, global::MockSite.Message.UsersResponse>(serviceImpl.GetAll)); serviceBinder.AddMethod(__Method_Authenticate, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.AuthenticateMessage, global::MockSite.Message.AuthenticateResponse>(serviceImpl.Authenticate)); serviceBinder.AddMethod(__Method_Get, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.QueryUserMessage, global::MockSite.Message.UserResponse>(serviceImpl.Get)); serviceBinder.AddMethod(__Method_Update, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.UpdateUserMessage, global::MockSite.Message.BaseResponse>(serviceImpl.Update)); serviceBinder.AddMethod(__Method_Delete, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::MockSite.Message.QueryUserMessage, global::MockSite.Message.BaseResponse>(serviceImpl.Delete)); }
public FolderController(UserServiceBase userService, RoleServiceBase roleService, FolderServiceBase folderService, ToDoListServiceBase toDoListService, ItemServiceBase itemService, IMapper mapper) { this.userService = userService; this.roleService = roleService; this.folderService = folderService; this.toDoListService = toDoListService; this.itemService = itemService; this.mapper = mapper; }
public ConfigurationTesterController(ApplicationSettings appSettings, IUserContext userContext, ConfigReaderWriter configReaderWriter, IActiveDirectoryProvider activeDirectoryProvider, UserServiceBase userService, IDatabaseTester databaseTester) { _applicationSettings = appSettings; _userContext = userContext; _configReaderWriter = configReaderWriter; _activeDirectoryProvider = activeDirectoryProvider; _userService = userService; _databaseTester = databaseTester; }
public PagesController(ApplicationSettings settings, UserServiceBase userManager, SettingsService settingsService, IPageService pageService, SearchService searchService, PageHistoryService historyService, IUserContext context) : base(settings, userManager, context, settingsService) { _settingsService = settingsService; _pageService = pageService; _searchService = searchService; _historyService = historyService; }
public InstallController(ApplicationSettings settings, UserServiceBase userService, PageService pageService, SearchService searchService, IRepository respository, SettingsService settingsService, IUserContext context, ConfigReaderWriter configReaderWriter) : base(settings, userService, context, settingsService) { _pageService = pageService; _searchService = searchService; _repository = respository; _settingsService = settingsService; _configReaderWriter = configReaderWriter; }
public PluginSettingsController(ApplicationSettings settings, UserServiceBase userService, IUserContext context, SettingsService settingsService, IPluginFactory pluginFactory, ISettingsRepository settingsRepository, SiteCache siteCache, PageViewModelCache viewModelCache, ListCache listCache) : base(settings, userService, context, settingsService) { _pluginFactory = pluginFactory; _settingsRepository = settingsRepository; _siteCache = siteCache; _viewModelCache = viewModelCache; _listCache = listCache; }
public ToolsController(ApplicationSettings settings, UserServiceBase userManager, SettingsService settingsService, PageService pageService, SearchService searchService, IUserContext context, ListCache listCache, PageViewModelCache pageViewModelCache, IWikiImporter wikiImporter, IPluginFactory pluginFactory, WikiExporter wikiExporter) : base(settings, userManager, context, settingsService) { _pageService = pageService; _searchService = searchService; _listCache = listCache; _pageViewModelCache = pageViewModelCache; _wikiImporter = wikiImporter; _wikiExporter = wikiExporter; }
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> public static void BindService(grpc::ServiceBinderBase serviceBinder, UserServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_Create, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Soit.Authentication.Protos.CreateUserRequest, global::Google.Protobuf.WellKnownTypes.StringValue>(serviceImpl.Create)); serviceBinder.AddMethod(__Method_Remove, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Soit.Authentication.Protos.RemoveUserRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.Remove)); serviceBinder.AddMethod(__Method_Update, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Soit.Authentication.Protos.UpdateUserRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.Update)); serviceBinder.AddMethod(__Method_Query, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Soit.Authentication.Protos.QueryUserRequest, global::Soit.Authentication.Protos.QueryUserReply>(serviceImpl.Query)); serviceBinder.AddMethod(__Method_Find, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Protobuf.WellKnownTypes.StringValue, global::Soit.Authentication.Protos.FindUserReply>(serviceImpl.Find)); serviceBinder.AddMethod(__Method_UpdateName, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Soit.Authentication.Protos.UpdateUserNameRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.UpdateName)); serviceBinder.AddMethod(__Method_ResetPassword, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Soit.Authentication.Protos.ResetPasswordRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.ResetPassword)); serviceBinder.AddMethod(__Method_UpdatePassword, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Soit.Authentication.Protos.UpdatePasswordRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.UpdatePassword)); serviceBinder.AddMethod(__Method_UpdateRoles, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Soit.Authentication.Protos.UpdateUserRolesRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.UpdateRoles)); serviceBinder.AddMethod(__Method_UpdateOrganizations, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Soit.Authentication.Protos.UpdateUserOrganizationsRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.UpdateOrganizations)); serviceBinder.AddMethod(__Method_UpdateStates, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Soit.Authentication.Protos.UpdateUserStatesRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.UpdateStates)); }
public void Setup() { _container = new MocksAndStubsContainer(); _applicationSettings = _container.ApplicationSettings; _applicationSettings.AttachmentsFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "attachments"); _context = _container.UserContext; _repository = _container.Repository; _settingsService = _container.SettingsService; _userService = new FormsAuthUserService(_applicationSettings, _repository); _configReaderWriter = new ConfigReaderWriterStub(); _upgradeController = new UpgradeController(_applicationSettings, _repository, _userService, _context, _settingsService, _configReaderWriter); }
/// <summary> /// Used by the IOC and by validation. /// </summary> /// <param name="settings"></param> /// <param name="userManager"></param> public UserViewModel(ApplicationSettings settings, UserServiceBase userManager) { if (settings == null) { throw new ArgumentNullException("settings"); } if (userManager == null) { throw new ArgumentNullException("userManager"); } Settings = settings; UserService = userManager; }
public AccountController(UserServiceBase userService, RoleServiceBase roleService) { this.userService = userService; this.roleService = roleService; }