CSLA.NET
6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Macros
Pages
HttpProxyExtensions.cs
Go to the documentation of this file.
1
//-----------------------------------------------------------------------
2
// <copyright file="HttpProxyExtensions.cs" company="Marimer LLC">
3
// Copyright (c) Marimer LLC. All rights reserved.
4
// Website: https://cslanet.com
5
// </copyright>
6
// <summary>Implement extension methods data portal channel</summary>
7
//-----------------------------------------------------------------------
8
using
System;
9
using
System.Net.Http;
10
using
Csla
.
DataPortalClient
;
11
using
Microsoft
.
Extensions
.
DependencyInjection
;
12
13
namespace
Csla.Configuration
14
{
18
public
static
class
HttpProxyExtensions
19
{
25
public
static
DataPortalClientOptions UseHttpProxy(
this
DataPortalClientOptions config, Action<Csla.Channels.Http.HttpProxyOptions> options)
26
{
27
var proxyOptions =
new
Csla
.
Channels
.
Http
.
HttpProxyOptions
();
28
options?.Invoke(proxyOptions);
29
config.Services.AddTransient(typeof(
IDataPortalProxy
),
30
sp =>
31
{
32
var applicationContext = sp.GetRequiredService<ApplicationContext>();
33
var client = sp.GetRequiredService<HttpClient>();
34
return
new
Csla
.
Channels
.
Http
.
HttpProxy
(applicationContext, client, proxyOptions);
35
});
36
return
config;
37
}
38
}
39
}
Csla.Channels.Http.HttpProxy
Implements a data portal proxy to relay data portal calls to a remote application server by using htt...
Definition:
HttpProxy.cs:23
Csla.Channels.Http.HttpProxyOptions
Options for HttpProxy
Definition:
HttpProxyOptions.cs:15
Csla.DataPortalClient.IDataPortalProxy
Interface implemented by client-side data portal proxy objects.
Definition:
IDataPortalProxy.cs:17
Csla.Channels.Http
Definition:
HttpCompressionProxy.cs:13
Csla.Channels
Definition:
GrpcPortal.cs:23
Csla.Configuration
Definition:
Csla.AspNetCore/ConfigurationExtensions.cs:20
Csla.DataPortalClient
Definition:
Csla/DataPortalClient/DataPortalFactory.cs:11
Csla
Definition:
BusinessRuleCases.cs:5
Microsoft.Extensions.DependencyInjection
Definition:
ServiceCollectionExtensions.cs:17
Microsoft.Extensions
Definition:
ServiceCollectionExtensions.cs:17
Microsoft
Definition:
ServiceCollectionExtensions.cs:17
Generated by
1.9.2