mirror of https://github.com/abpframework/abp.git
6 changed files with 40 additions and 42 deletions
@ -0,0 +1,17 @@ |
|||||
|
namespace Volo.Abp.Http.Client |
||||
|
{ |
||||
|
public class RemoteServiceConfiguration |
||||
|
{ |
||||
|
public string BaseUrl { get; set; } |
||||
|
|
||||
|
public RemoteServiceConfiguration() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public RemoteServiceConfiguration(string baseUrl) |
||||
|
{ |
||||
|
BaseUrl = baseUrl; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Volo.Abp.Http.Client |
||||
|
{ |
||||
|
public class RemoteServiceConfigurationDictionary : Dictionary<string, RemoteServiceConfiguration> |
||||
|
{ |
||||
|
public const string DefaultName = "Default"; |
||||
|
|
||||
|
public RemoteServiceConfiguration Default |
||||
|
{ |
||||
|
get { return this.GetOrDefault(DefaultName); } |
||||
|
set { this[DefaultName] = value; } |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,42 +1,12 @@ |
|||||
using System; |
namespace Volo.Abp.Http.Client |
||||
using System.Collections.Generic; |
|
||||
using System.Text; |
|
||||
|
|
||||
namespace Volo.Abp.Http.Client |
|
||||
{ |
{ |
||||
public class RemoteServiceOptions |
public class RemoteServiceOptions |
||||
{ |
{ |
||||
public RemoteServiceDictionary RemoteServices { get; set; } |
public RemoteServiceConfigurationDictionary RemoteServices { get; set; } |
||||
|
|
||||
public RemoteServiceOptions() |
public RemoteServiceOptions() |
||||
{ |
{ |
||||
RemoteServices = new RemoteServiceDictionary(); |
RemoteServices = new RemoteServiceConfigurationDictionary(); |
||||
} |
|
||||
} |
|
||||
|
|
||||
public class RemoteServiceDictionary : Dictionary<string, RemoteServiceConfiguration> |
|
||||
{ |
|
||||
public const string DefaultName = "Default"; |
|
||||
|
|
||||
public RemoteServiceConfiguration Default |
|
||||
{ |
|
||||
get { return this.GetOrDefault(DefaultName); } |
|
||||
set { this[DefaultName] = value; } |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public class RemoteServiceConfiguration |
|
||||
{ |
|
||||
public string BaseUrl { get; set; } |
|
||||
|
|
||||
public RemoteServiceConfiguration() |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
|
|
||||
public RemoteServiceConfiguration(string baseUrl) |
|
||||
{ |
|
||||
BaseUrl = baseUrl; |
|
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue