首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >stackexchange.redis

stackexchange.redis

作者头像
sofu456
发布2020-02-25 15:13:59
发布2020-02-25 15:13:59
5520
举报
文章被收录于专栏:sofu456sofu456

redis客户端

代码语言:javascript
复制
using ControlSystem.Log;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace ControlSystem.Redis
{
    public class RedisClient
    {
        ConnectionMultiplexer m_connect;

        int m_redisPort = 6379;
        string m_redisIP;
        
        EndPoint[] EndPoints { get { return m_connect.GetEndPoints(); } }
        IDatabase DataBase { get { return m_connect.GetDatabase(); } }
        IServer GetServer { get { return m_connect.GetServer(m_redisIP, m_redisPort); } }

        public RedisClient()
        {
            string connect = ConfigurationManager.ConnectionStrings["Redis"].ConnectionString;
            if (!string.IsNullOrEmpty(connect))
            {
                string[] context 
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • redis客户端
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档