예제 #1
0
        //TODO: migrate later on somewhere else, when making a generic Bootstrapper
        public static void InitializeRestEndpoints()
        {
            IEndpointRegister endpointRegister = DiHelper.GetService <IEndpointRegister>();

            if (endpointRegister != null)
            {
                endpointRegister.AddEndpoint("SuperHotFeatureServer.SDK.Client.GetValueAsync", "api/values");
                endpointRegister.AddEndpoint("SuperHotOtherFeatureServer.SDK.Client.GetValueAsync", "api/values");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.AddUserAsync", "api/adduser");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.GetUserAsync", "api/permissions");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.CheckPermissionAsync", "api/permissions/check");
                endpointRegister.AddEndpoint("PermissionServer.Client.BaseClient.GetGivenPermissionsAsync", "api/permissions/givenpermissions");
                endpointRegister.AddEndpoint("TestResourceLocation", "api/permissions/");
                endpointRegister.AddEndpoint("ValueStore", "api/values/");
                endpointRegister.AddEndpoint("SpecialValueStore", "api/specialvalues/");
            }
        }
            public void GetEndpoint()
            {
                DiSetup.RestDataServiceTests();
                IEndpointRegister endpointRegister = DiHelper.GetService <IEndpointRegister>();
                bool wasSuccessfullyAdded          = endpointRegister.AddEndpoint("SomeEndpointTest", "TestString");

                string result = endpointRegister.GetEndpoint("SomeEndpointTest");

                Assert.AreEqual(true, wasSuccessfullyAdded);
                Assert.IsNotNull(result);
                Assert.AreEqual("TestString", result);
            }
예제 #3
0
        //TODO: migrate later on somewhere else, when making a generic Bootstrapper
        public static void InitializeInMemoryEndpoints()
        {
            IEndpointRegister endpointRegister = DiHelper.GetService <IEndpointRegister>();

            if (endpointRegister != null)
            {
                endpointRegister.AddEndpoint("GetAsyncTest1Action", "GetAsyncTest1");
                endpointRegister.AddEndpoint("GetAsyncTest4Action", "GetAsyncTest4");
                endpointRegister.AddEndpoint("GetAsyncTest2Action", "GetAsyncTest2");
                endpointRegister.AddEndpoint("GetAsyncTest3Action", "GetAsyncTest3");
                endpointRegister.AddEndpoint("CreateOrUpdateAsyncTest1Action", "CreateOrUpdateAsyncTest1");
                endpointRegister.AddEndpoint("CreateOrUpdateAsyncTest2Action", "CreateOrUpdateAsyncTest2");
                endpointRegister.AddEndpoint("CreateOrUpdateAsyncTest3Action", "CreateOrUpdateAsyncTest3");
                endpointRegister.AddEndpoint("CreateOrUpdateAsyncTest4Action", "CreateOrUpdateAsyncTest4");
                endpointRegister.AddEndpoint("DeleteAsyncTest1Action", "DeleteAsyncTest1");
                endpointRegister.AddEndpoint("Values", "Values");
                endpointRegister.AddEndpoint("SpecialValues", "SpecialValues");
            }
        }
예제 #4
0
        //TODO: migrate later on somewhere else, when making a generic Bootstrapper
        public static void InitializeFileEndpoints()
        {
            IEndpointRegister endpointRegister = DiHelper.GetService <IEndpointRegister>();

            if (endpointRegister != null)
            {
                endpointRegister.AddEndpoint("GetAsyncTest1Action", "TextFile1.json");
                endpointRegister.AddEndpoint("GetAsyncTest4Action", "TextFile7.json");
                endpointRegister.AddEndpoint("GetAsyncTest2Action", "TextFile2.json");
                endpointRegister.AddEndpoint("GetAsyncTest3Action", "TextFile3.json");
                endpointRegister.AddEndpoint("CreateOrUpdateAsyncTest1Action", "TextFile4.json");
                endpointRegister.AddEndpoint("CreateOrUpdateAsyncTest2Action", "TextFile5.json");
                endpointRegister.AddEndpoint("CreateOrUpdateAsyncTest3Action", "TextFile55.json");
                endpointRegister.AddEndpoint("CreateOrUpdateAsyncTest4Action", "TextFile555.json");
                endpointRegister.AddEndpoint("CreateOrUpdateAsyncTest5Action", "TextFile5555.json");
                endpointRegister.AddEndpoint("DeleteAsyncTest1Action", "TextFile6.json");
                endpointRegister.AddEndpoint("DeleteAsyncTest2Action", "TextFile8.json");
            }
        }
예제 #5
0
        //TODO: migrate later on somewhere else, when making a generic Bootstrapper
        public static void Initialize()
        {
            IEndpointRegister endpointRegister = DiHelper.GetService <IEndpointRegister>();

            if (endpointRegister != null)
            {
                endpointRegister.AddEndpoint("SuperHotFeatureServer.SDK.Client.GetValueAsync", "api/values");
                endpointRegister.AddEndpoint("SuperHotOtherFeatureServer.SDK.Client.GetValueAsync", "api/values");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.AddUserAsync", "api/adduser");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.GetUserAsync", "api/permissions");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.CheckPermissionAsync", "api/permissions/check");
                //endpointRegister.AddEndpoint("PermissionServer.Client.BaseClient.fetchPermissions", "api/permissions/givenpermissions");
                endpointRegister.AddEndpoint("PermissionServer.Client.BaseClient.fetchPermissions", "api/permissions/userpermissions");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.fetchUserValues", "api/permissions/uservalues");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.GetAllPermissionsAsync", "api/permissions/getpermissions");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.GetAllUserPermissionsAsync", "api/permissions/userpermissions");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.AddPermissionAsync", "api/permissions/addpermission");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.GetAllUsersAsync", "api/permissions/getusers");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.GetAllRolesAsync", "api/permissions/getroles");
                endpointRegister.AddEndpoint("PermissionServer.SDK.Client.GetUnkownLoginsAsync", "api/permissions/getunknownlogins");

                endpointRegister.AddEndpoint("PermissionServer.Core.Services.PermissionService.Store", "permissions.json");
                endpointRegister.AddEndpoint("PermissionServer.Core.Services.RoleService.Store", "roles.json");
                endpointRegister.AddEndpoint("PermissionServer.Core.Services.UserService.Store", "users.json");
            }

            IFeatureToggleManager featureToggleManager = DiHelper.GetService <IFeatureToggleManager>();

            if (featureToggleManager != null)
            {
                //TODO. set up feature toggles
            }
        }