当前位置: 首页>>代码示例>>C#>>正文


C# IResourceManager.GetString方法代码示例

本文整理汇总了C#中IResourceManager.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# IResourceManager.GetString方法的具体用法?C# IResourceManager.GetString怎么用?C# IResourceManager.GetString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IResourceManager的用法示例。


在下文中一共展示了IResourceManager.GetString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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]);
 }
开发者ID:namman,项目名称:ServiceStack,代码行数:7,代码来源:FacebookAuthProvider.cs

示例2: SiteConfig

        public SiteConfig(IResourceManager resources)
        {
            OAuthURL = resources.GetString("OAuthURL");
            if (OAuthURL == null)
            {
                ThrowConfigException("OAuthURL");
            }

            AppID = resources.GetString("AppID");
            if (AppID == null)
            {
                ThrowConfigException("AppID");
            }
            SodaHost = resources.GetString("SodaHost");
            if (AppID == null)
            {
                ThrowConfigException("SodaHost");
            }

            SodaDataSet = resources.GetString("SodaDataSet");
            if (AppID == null)
            {
                ThrowConfigException("SodaDataSet");
            }

            ServiceRequestDataSet = resources.GetString("ServiceRequestDataSet");
            if (AppID == null)
            {
                ThrowConfigException("ServiceRequestDataSet");
            }
        }
开发者ID:sweatercomeback,项目名称:public-data-extravaganza,代码行数:31,代码来源:SiteConfig.cs

示例3: YammerAuthProvider

 /// <summary>
 /// Initializes a new instance of the <see cref="YammerAuthProvider"/> class.
 /// </summary>
 /// <param name="appSettings">
 /// The application settings (in web.config).
 /// </param>
 public YammerAuthProvider(IResourceManager appSettings)
     : base(appSettings, appSettings.GetString("oauth.yammer.Realm"), Name, "ClientId", "AppSecret")
 {
     this.ClientId = appSettings.GetString("oauth.yammer.ClientId");
     this.ClientSecret = appSettings.GetString("oauth.yammer.ClientSecret");
     this.PreAuthUrl = appSettings.GetString("oauth.yammer.PreAuthUrl");
 }
开发者ID:Qasemt,项目名称:NServiceKit,代码行数:13,代码来源:YammerAuthProvider.cs

示例4: Auth0Provider

        public Auth0Provider(IResourceManager appSettings, string realm)
            : base(appSettings, realm, Name)
        {
            this.AuthRealm = realm;
            this.AppId = appSettings.GetString("oauth.auth0.AppId");

            if (string.IsNullOrWhiteSpace(this.AppId))
            {
                throw new ArgumentNullException("oauth.auth0.AppId");
            }

            this.AppSecret = appSettings.GetString("oauth.auth0.AppSecret");

            if (string.IsNullOrWhiteSpace(this.AppSecret))
            {
                throw new ArgumentNullException("oauth.auth0.AppSecret");
            }

            this.Connection = appSettings.GetString("oauth.auth0.DefaultConnection");

            // Construct URLs based on realm
            this.PreAuthUrl = realm + "/authorize";
            this.AccessTokenUrl = realm + "/oauth/token";
            this.UserInfoUrl = realm + "/userinfo";
        }
开发者ID:rasikas,项目名称:Sandbox,代码行数:25,代码来源:Auth0Provider.cs

示例5: 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.RedirectUrl = appSettings.GetString("oauth.{0}.RedirectUrl".Fmt(oAuthProvider));
            this.SessionExpiry = DefaultSessionExpiry;
        }
开发者ID:half-evil,项目名称:ServiceStack,代码行数:9,代码来源:AuthProvider.cs

示例6: 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;
            }
        }
开发者ID:aicl,项目名称:SuperGym,代码行数:57,代码来源:AppConfig.cs

示例7: 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;
        }
开发者ID:yeurch,项目名称:ServiceStack,代码行数:13,代码来源:AuthProvider.cs

示例8: 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");
        }
开发者ID:austinvernsonger,项目名称:ServiceStack,代码行数:14,代码来源:AuthConfig.cs

示例9: AppConfig

		public AppConfig(IResourceManager resources)
		{
			this.RootDirectory = resources.GetString("RootDirectory").MapHostAbsolutePath()
				.Replace('\\', Path.DirectorySeparatorChar);

			this.TextFileExtensions = resources.GetList("TextFileExtensions");
			this.ExcludeDirectories = resources.GetList("ExcludeDirectories");
		}
开发者ID:nuxleus,项目名称:ServiceStack.Examples,代码行数:8,代码来源:AppConfig.cs

示例10: 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();
        }
开发者ID:Qasemt,项目名称:NServiceKit,代码行数:25,代码来源:OAuthProvider.cs

示例11: 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));
 }
开发者ID:yeurch,项目名称:ServiceStack,代码行数:15,代码来源:OAuth2Provider.cs

示例12: AxConfig

 public AxConfig(IResourceManager appConfig)
 {
     Ax_UserName = appConfig.GetString("Ax_UserName");
     Ax_UserDomain = appConfig.GetString("Ax_UserDomain");
     Ax_Company = appConfig.GetString("Ax_Company");
     Ax_Configuration = appConfig.GetString("Ax_Configuration");
     Ax_ProxyUserName = appConfig.GetString("Ax_ProxyUserName");
     Ax_ProxyUserPassword = appConfig.GetString("Ax_ProxyUserPassword");
     Ax_ProxyUserDomain = appConfig.GetString("Ax_ProxyUserDomain");
 }
开发者ID:MaKeBits,项目名称:ChelabAxREST,代码行数:10,代码来源:BC.NET.cs

示例13: OAuth2Provider

        /// <summary>Initializes a new instance of the NServiceKit.Authentication.OAuth2.OAuth2Provider class.</summary>
        ///
        /// <param name="appSettings">The application settings.</param>
        /// <param name="realm">      The realm.</param>
        /// <param name="provider">   The provider.</param>
        protected OAuth2Provider(IResourceManager appSettings, string realm, string provider)
            : base(appSettings, realm, provider)
        {
            this.ConsumerKey = appSettings.GetString("oauth.{0}.ConsumerKey".Fmt(provider))
                ?? FallbackConfig(appSettings.GetString("oauth.ConsumerKey"));
            this.ConsumerSecret = appSettings.GetString("oauth.{0}.ConsumerSecret".Fmt(provider))
                ?? FallbackConfig(appSettings.GetString("oauth.ConsumerSecret"));
            var scopes = appSettings.GetString("oauth.{0}.Scopes".Fmt(provider))
                ?? FallbackConfig(appSettings.GetString("oauth.Scopes")) ?? "";
            this.Scopes = scopes.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries);

            this.RequestTokenUrl = appSettings.GetString("oauth.{0}.RequestTokenUrl".Fmt(provider))
                ?? FallbackConfig(appSettings.GetString("oauth.RequestTokenUrl"));
            this.AuthorizeUrl = appSettings.GetString("oauth.{0}.AuthorizeUrl".Fmt(provider))
                ?? FallbackConfig(appSettings.GetString("oauth.AuthorizeUrl"));
            this.AccessTokenUrl = appSettings.GetString("oauth.{0}.AccessTokenUrl".Fmt(provider))
                ?? FallbackConfig(appSettings.GetString("oauth.AccessTokenUrl"));
            this.UserProfileUrl = appSettings.GetString("oauth.{0}.UserProfileUrl".Fmt(provider))
                ?? FallbackConfig(appSettings.GetString("oauth.UserProfileUrl"));
        }
开发者ID:Qasemt,项目名称:NServiceKit,代码行数:25,代码来源:OAuth2Provider.cs

示例14: AppConfig

 public AppConfig(IResourceManager resources)
 {
     this.RootDirectory = resources.GetString("RootDirectory").MapHostAbsolutePath();
 }
开发者ID:jklemmack,项目名称:FileManager,代码行数:4,代码来源:AppConfig.cs

示例15: AppConfig

		public AppConfig(IResourceManager resources)
		{
			RootDirectory = resources.GetString("RootDirectory");	
			PhotoDirectory = resources.GetString("PhotoDirectory");
			LibDirectory = resources.GetString("LibDirectory");
		}
开发者ID:angelcolmenares,项目名称:ServiceStack.AuthDemo,代码行数:6,代码来源:AppConfig.cs


注:本文中的IResourceManager.GetString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。