Exemplo n.º 1
0
        static WeiXinMpConfig()
        {
            var appSettings = new ServiceStack.Configuration.AppSettings();

            AppId          = appSettings.Get <string>($"WeiXin.MP.AppId");
            AppSecret      = appSettings.Get <string>($"WeiXin.MP.{AppId}.AppSecret");
            Token          = appSettings.Get <string>($"WeiXin.MP.{AppId}.Token");
            EncodingAesKey = appSettings.Get <string>($"WeiXin.MP.{AppId}.EncodingAESKey");
        }
Exemplo n.º 2
0
        static ServerConfig()
        {
            var appSettings = new ServiceStack.Configuration.AppSettings();

            //use default value if no config exists
            AppId = appSettings.Get <string>("AppID");
            WebHostHttpUrlList  = appSettings.GetList("WebAPI.WebHostUrl.Http");
            WebHostHttpsUrlList = appSettings.GetList("WebAPI.WebHostUrl.https");
            BaseUrl             = appSettings.Get <string>("WebAPI.BaseUrl", "");

            UserName = appSettings.Get <string>("WebAPI.UserName");
            Password = appSettings.Get <string>("WebAPI.Password");

            ProjectPath = appSettings.Get <string>("HostingEnvironment.ContentRootPath", "~");
        }
Exemplo n.º 3
0
        static WeiXinWorkConfig()
        {
            var appSettings = new ServiceStack.Configuration.AppSettings();

            //use default value if no config exists
            CorpId = appSettings.Get <string>("WeiXin.Work.CorpId");
            //CorpSecret = appSettings.Get<string>($"WeiXin.Work.{CorpId}.CorpSecret");
            Token          = appSettings.Get <string>($"WeiXin.Work.{CorpId}.Token");
            EncodingAesKey = appSettings.Get <string>($"WeiXin.Work.{CorpId}.EncodingAESKey");

            ProviderSecret    = appSettings.Get <string>($"WeiXin.Work.{CorpId}.ProviderSecret");
            AppSecret         = appSettings.Get <string>($"WeiXin.Work.{CorpId}.AppSecret", "");
            ContactsApiSecret = appSettings.Get <string>($"WeiXin.Work.{CorpId}.ContactsApiSecret");
            SysLogAgentId     = appSettings.Get <string>($"WeiXin.Work.{CorpId}.SysLogAgentId");
            UserLogAgentId    = appSettings.Get <string>($"WeiXin.Work.{CorpId}.UserLogAgentId");
        }