PlatformNet
Assembly: ServiceStack.dll
View Source
public class PlatformNet : Platform
Fields
ConfigNullValue
View Source
public const string ConfigNullValue = "{null}"
Methods
ConfigSectionExists(String)
Determines whether the Config section identified by the sectionName exists.
View Source
public static bool ConfigSectionExists(string sectionName)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | sectionName |
GetNullableAppSetting(String)
View Source
public override string GetNullableAppSetting(string key)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | key |
GetAppSetting(String)
View Source
public override string GetAppSetting(string key)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | key |
GetAppSetting(String, String)
View Source
public override string GetAppSetting(string key, string defaultValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | key |
System.String | defaultValue |
GetConnectionString(String)
View Source
public override string GetConnectionString(string key)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | key |
GetAppSetting<T>(String, T)
View Source
public override T GetAppSetting<T>(string key, T defaultValue)
Returns
<T>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | defaultValue |
Type Parameters
T
GetConnectionStringSetting(String)
Gets the connection string setting.
View Source
public static ConnectionStringSettings GetConnectionStringSetting(string key)
Returns
System.Configuration.ConnectionStringSettings
Parameters
Type | Name |
---|---|
System.String | key |
InitHostConfig(HostConfig)
View Source
public override void InitHostConfig(HostConfig config)
Parameters
Type | Name |
---|---|
ServiceStack.HostConfig | config |
GetRazorNamespaces()
View Source
public override HashSet<string> GetRazorNamespaces()
Returns
System.Collections.Generic.HashSet<System.String>
GetAppConfigPath()
View Source
public override string GetAppConfigPath()
Returns
System.String
GetRequestAttributes(OperationContext)
View Source
public RequestAttributes GetRequestAttributes(OperationContext operationContext)
Returns
ServiceStack.RequestAttributes
Parameters
Type | Name |
---|---|
System.ServiceModel.OperationContext | operationContext |
GetIpAddress(OperationContext)
View Source
public static IPAddress GetIpAddress(OperationContext context)
Returns
System.Net.IPAddress
Parameters
Type | Name |
---|---|
System.ServiceModel.OperationContext | context |
GetCookiesAsDictionary(IRequest)
View Source
public override Dictionary<string, string> GetCookiesAsDictionary(IRequest httpReq)
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
GetCookiesAsDictionary(IResponse)
View Source
public override Dictionary<string, string> GetCookiesAsDictionary(IResponse httpRes)
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IResponse | httpRes |
Inherited Methods
GetAppConfigPath()
View Source
public virtual string GetAppConfigPath()
Returns
System.String
GetAppSetting(String)
View Source
public virtual string GetAppSetting(string key)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | key |
GetAppSetting(String, String)
View Source
public virtual string GetAppSetting(string key, string defaultValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | key |
System.String | defaultValue |
GetAppSetting<T>(String, T)
View Source
public virtual T GetAppSetting<T>(string key, T defaultValue)
Returns
<T>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | defaultValue |
Type Parameters
T
GetConnectionString(String)
View Source
public virtual string GetConnectionString(string key)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | key |
GetCookiesAsDictionary(IRequest)
View Source
public virtual Dictionary<string, string> GetCookiesAsDictionary(IRequest httpReq)
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
GetCookiesAsDictionary(IResponse)
View Source
public virtual Dictionary<string, string> GetCookiesAsDictionary(IResponse httpRes)
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IResponse | httpRes |
GetNullableAppSetting(String)
View Source
public virtual string GetNullableAppSetting(string key)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | key |
GetRazorNamespaces()
View Source
public virtual HashSet<string> GetRazorNamespaces()
Returns
System.Collections.Generic.HashSet<System.String>
InitHostConfig(HostConfig)
View Source
public virtual void InitHostConfig(HostConfig config)
Parameters
Type | Name |
---|---|
ServiceStack.HostConfig | config |
ParseTextValue<T>(String)
Returns the value returned by the 'T.Parse(string)' method if exists otherwise 'new T(string)'. e.g. if T was a TimeSpan it will return TimeSpan.Parse(textValue). If there is no Parse Method it will attempt to create a new instance of the destined type
View Source
public static T ParseTextValue<T>(string textValue)
Returns
<T>
Parameters
Type | Name |
---|---|
System.String | textValue |
Type Parameters
T