asmrobot
2019-11-25 2aeab450471cb80b59002da7da80faf251a0c4f4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZTImage.Configuration;
 
namespace RichCreator.Utilitys
{
    /// <summary>
    /// 外部服务提供器
    /// </summary>
    public class ServiceProvider
    {
 
        /// <summary>
        /// 微信通知
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public bool NotificationWechat(string message)
        {
            var config=ConfigHelper.GetInstance<RichCreatorConfig>();
            if (config.NotificationWechat)
            {
                //发信息
            }
            return true;
        }
 
        #region singleton
        private static ServiceProvider instance = null;
        private static object lockHelper = new object();
        public static ServiceProvider Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (lockHelper)
                    {
                        if (instance == null)
                        {
                            instance = new ServiceProvider();
                        }
                    }
                }
                return instance;
            }
        }
        #endregion
    }
}