Exemplo n.º 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/");
            }
        }
Exemplo n.º 2
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");
            }
        }
Exemplo n.º 3
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");
            }
        }
Exemplo n.º 4
0
 public static void AddToAspNetCore(IServiceCollection services)
 {
     DiManager.GetInstance().RegisterType <IEndpointRegister, NET.efilnukefesin.Implementations.Services.DataService.EndpointRegister.EndpointRegister>(Lifetime.Singleton);  //where is all the data coming from?
     services.AddSingleton <IDataService>(s => DiHelper.GetService <InMemoryDataService>("Data"));
     DiSetup.Initialize();
 }