本文整理汇总了C#中IResourceManager.Get方法的典型用法代码示例。如果您正苦于以下问题:C# IResourceManager.Get方法的具体用法?C# IResourceManager.Get怎么用?C# IResourceManager.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IResourceManager
的用法示例。
在下文中一共展示了IResourceManager.Get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AppConfig
public AppConfig(IResourceManager appSettings)
{
this.Env = appSettings.Get("Env", Env.Local);
this.EnableCdn = appSettings.Get("EnableCdn", false);
this.CdnPrefix = appSettings.Get("CdnPrefix", "");
this.AdminUserNames = appSettings.Get("AdminUserNames", new List<string>());
}
示例2: AppConfig
public AppConfig(IResourceManager appSettings)
{
Env = appSettings.Get("Env", Env.Local);
EnableCdn = appSettings.Get("EnableCdn", false);
CdnPrefix = appSettings.Get("CdnPrefix", "");
AdminUserNames = appSettings.Get("AdminUserNames", new List<string>());
GoogleApiKey = appSettings.Get("GoogleApiKey", "");
}
示例3: AppConfig
public AppConfig(IResourceManager appSettings)
{
//this.Env = appSettings.Get("Env", Env.Local);
//this.EnableCdn = appSettings.Get("EnableCdn", false);
//this.CdnPrefix = appSettings.Get("CdnPrefix", "");
AdminUserNames = appSettings.Get("AdminUserNames", new List<string>());
ConnectionString = ConfigUtils.GetConnectionString("DBConn");
GalleryImagesRoot = appSettings.Get("GalleryImagesRoot", "/GalleryImages");
UploadDirName = appSettings.Get("UploadDirName", "upload");
}
示例4: AuthConfig
public AuthConfig(IResourceManager appSettings, string authRealm, string oAuthProvider,
string consumerKeyName, string consumerSecretName)
{
this.AuthRealm = appSettings.Get("OAuthRealm", authRealm);
this.Provider = oAuthProvider;
this.CallbackUrl = appSettings.GetString("oauth.{0}.CallbackUrl".Fmt(oAuthProvider));
this.ConsumerKey = appSettings.GetString("oauth.{0}.{1}".Fmt(oAuthProvider, consumerKeyName));
this.ConsumerSecret = appSettings.GetString("oauth.{0}.{1}".Fmt(oAuthProvider, consumerSecretName));
this.RequestTokenUrl = appSettings.Get("oauth.{0}.RequestTokenUrl", authRealm + "oauth/request_token");
this.AuthorizeUrl = appSettings.Get("oauth.{0}.AuthorizeUrl", authRealm + "oauth/authorize");
this.AccessTokenUrl = appSettings.Get("oauth.{0}.AccessTokenUrl", authRealm + "oauth/access_token");
}
示例5: FacebookAuthProvider
public FacebookAuthProvider(IResourceManager appSettings)
: base(appSettings, Realm, Name, "AppId", "AppSecret")
{
this.AppId = appSettings.GetString("oauth.facebook.AppId");
this.AppSecret = appSettings.GetString("oauth.facebook.AppSecret");
this.Permissions = appSettings.Get("oauth.facebook.Permissions", new string[0]);
}
示例6: AuthProvider
protected AuthProvider(IResourceManager appSettings, string authRealm, string oAuthProvider)
{
this.AuthRealm = appSettings.Get("OAuthRealm", authRealm);
this.Provider = oAuthProvider;
this.CallbackUrl = appSettings.GetString("oauth.{0}.CallbackUrl".Fmt(oAuthProvider));
this.SessionExpiry = DefaultSessionExpiry;
}
示例7: OAuthProvider
/// <summary>Initializes a new instance of the NServiceKit.ServiceInterface.Auth.OAuthProvider class.</summary>
///
/// <param name="appSettings"> The application settings.</param>
/// <param name="authRealm"> The authentication realm.</param>
/// <param name="oAuthProvider"> The authentication provider.</param>
/// <param name="consumerKeyName"> Name of the consumer key.</param>
/// <param name="consumerSecretName">Name of the consumer secret.</param>
public OAuthProvider(IResourceManager appSettings, string authRealm, string oAuthProvider,
string consumerKeyName, string consumerSecretName)
{
this.AuthRealm = appSettings.Get("OAuthRealm", authRealm);
this.Provider = oAuthProvider;
this.RedirectUrl = appSettings.GetString("oauth.{0}.RedirectUrl".Fmt(oAuthProvider));
this.CallbackUrl = appSettings.GetString("oauth.{0}.CallbackUrl".Fmt(oAuthProvider));
this.ConsumerKey = appSettings.GetString("oauth.{0}.{1}".Fmt(oAuthProvider, consumerKeyName));
this.ConsumerSecret = appSettings.GetString("oauth.{0}.{1}".Fmt(oAuthProvider, consumerSecretName));
this.RequestTokenUrl = appSettings.Get("oauth.{0}.RequestTokenUrl".Fmt(oAuthProvider), authRealm + "oauth/request_token");
this.AuthorizeUrl = appSettings.Get("oauth.{0}.AuthorizeUrl".Fmt(oAuthProvider), authRealm + "oauth/authorize");
this.AccessTokenUrl = appSettings.Get("oauth.{0}.AccessTokenUrl".Fmt(oAuthProvider), authRealm + "oauth/access_token");
this.OAuthUtils = new OAuthAuthorizer(this);
this.AuthHttpGateway = new AuthHttpGateway();
}
示例8: AuthProvider
protected AuthProvider(IResourceManager appSettings, string authRealm, string oAuthProvider)
{
// Enhancement per https://github.com/ServiceStack/ServiceStack/issues/741
this.AuthRealm = appSettings != null ? appSettings.Get("OAuthRealm", authRealm) : authRealm;
this.Provider = oAuthProvider;
if (appSettings != null)
{
this.CallbackUrl = appSettings.GetString("oauth.{0}.CallbackUrl".Fmt(oAuthProvider));
this.RedirectUrl = appSettings.GetString("oauth.{0}.RedirectUrl".Fmt(oAuthProvider));
}
this.SessionExpiry = DefaultSessionExpiry;
}
示例9: AppConfig
public AppConfig(IResourceManager resources)
{
RootDirectory = resources.GetString("RootDirectory");
PhotoDirectory = resources.GetString("PhotoDirectory");
MetaFilesDirectory = resources.GetString("MetaFilesDirectory");
PrintOutDirectory = resources.GetString("PrintOutDirectory");
ReportConnection = resources.GetString("ReportConnection");
MailFrom = resources.GetString("MailFrom");
MailServerUrl = resources.GetString("MailServerUrl");
MailServerUser = resources.GetString("MailServerUser");
MailServerPassword = resources.GetString("MailServerPassword");
MailServerPort= resources.Get<int>("MailServerPort",587);
MailServerEnableSsl= resources.Get<bool>("MailServerEnableSsl",true);
GymName = resources.Get<string> ("GymName", "GymName");
MensajeAsunto = resources.Get<string> ("MensajeAsunto", GymName);
LongitudFactura=resources.Get<int>("LongitudFactura",9);
string dow = resources.Get<string>("DiaDeCierre", "SABADO").ToUpper();
switch(dow){
case "1":
case "LUNES":
DiaDeCierre= DayOfWeek.Monday;
break;
case "2":
case "MARTES":
DiaDeCierre= DayOfWeek.Tuesday;
break;
case "3":
case "MIERCOLES":
DiaDeCierre= DayOfWeek.Wednesday;
break;
case "4":
case "JUEVES":
DiaDeCierre= DayOfWeek.Thursday;
break;
case "5":
case "VIERNES":
DiaDeCierre= DayOfWeek.Friday;
break;
case "6":
case "SABADO":
DiaDeCierre= DayOfWeek.Saturday;
break;
case "0":
case "7":
case "DOMINGO":
DiaDeCierre= DayOfWeek.Sunday;
break;
default:
DiaDeCierre= DayOfWeek.Saturday;
break;
}
}
示例10: OAuth2Provider
protected OAuth2Provider(IResourceManager appSettings, string realm, string provider)
{
this.Provider = provider;
this.AuthRealm = appSettings.Get("OAuthRealm", realm);
this.RedirectUrl = appSettings.GetString("oauth.{0}.RedirectUrl".Fmt(provider));
this.CallbackUrl = appSettings.GetString("oauth.{0}.CallbackUrl".Fmt(provider));
this.ConsumerKey = appSettings.GetString("oauth.{0}.{1}".Fmt(provider, "ConsumerKey"));
this.ConsumerSecret = appSettings.GetString("oauth.{0}.{1}".Fmt(provider, "ConsumerSecret"));
string scopes = appSettings.GetString("oauth.{0}.Scopes".Fmt(provider)) ?? string.Empty;
this.Scopes = scopes.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries);
this.RequestTokenUrl = appSettings.GetString("oauth.{0}.RequestTokenUrl".Fmt(provider));
this.AuthorizeUrl = appSettings.GetString("oauth.{0}.AuthorizeUrl".Fmt(provider));
this.AccessTokenUrl = appSettings.GetString("oauth.{0}.AccessTokenUrl".Fmt(provider));
this.UserProfileUrl = appSettings.GetString("oauth.{0}.UserProfileUrl".Fmt(provider));
}
示例11: AppConfig
public AppConfig(IResourceManager resources)
{
Channel= resources.Get<string>("CHANNEL","mail_log_channel");
}
示例12: AppConfig
public AppConfig(IResourceManager appConfig)
{
RedisHostAddress = appConfig.Get("RedisHostAddress", "localhost:6379");
RedisDb = appConfig.Get("RedisDb", 0);
DefaultRedirectPath = appConfig.Get("DefaultRedirectPath", "Public/Metadata");
}
示例13: TestConfig
public TestConfig(IResourceManager appConfig)
{
RedisHostAddress = appConfig.Get("RedisHostAddress", "localhost:6379");
RunIntegrationTests = appConfig.Get("RunIntegrationTests", false);
IntegrationTestsBaseUrl = appConfig.Get("IntegrationTestsBaseUrl", "http://localhost/RedisWebServices.Host/Public/");
}
示例14: AppConfig
public AppConfig(IResourceManager appSettings)
{
this.BuildMode = appSettings.Get("BuildDatabase", false);
}
示例15: AppConfig
public AppConfig(IResourceManager appSettings)
{
RedisReadWriteHosts = appSettings.Get("RedisReadWriteHosts", new List<string>());
UseRedis = appSettings.Get("UseRedis", false);
}