Esempio n. 1
0
        public void PostInitialize()
        {
            UserConfig cfg;
            if (m_core.TryGet<UserConfig>(out cfg))
            {
                m_cfg = cfg;
            }

            UserDataBaseService userDBservice;
            if (m_core.TryGet<UserDataBaseService>(out userDBservice))
            {
                m_userDataBaseService = userDBservice;
            }

            UserLoginService loginService;
            if (m_core.TryGet<UserLoginService>(out loginService))
            {
                m_loginService = loginService;
            }

            CommandConsole console;
            if ((m_core.TryGet<CommandConsole>(out console)) && (m_cfg != null)
                && (m_userDataBaseService != null) && (m_loginService != null))
            {
                RegisterConsoleCommands(console);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public FacebookStreamHandler(string httpMethod, string path, UserLoginService loginService)
        {
            m_loginService = loginService;
            m_httpMethod = httpMethod;
            m_path = path;

            if (!String.IsNullOrEmpty(m_loginService.m_config.FacebookAppKey) && !String.IsNullOrEmpty(m_loginService.m_config.FacebookAppKey))
                m_fbConnect = new FacebookConnect(m_loginService.m_config.FacebookAppKey, m_loginService.m_config.FacebookAppSecret);
        }
Esempio n. 3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public FilesystemStreamHandler(string httpMethod, string path, string filePath, UserLoginService loginService)
        {
            m_loginService = loginService;
            m_httpMethod = httpMethod;
            m_path = path;
            m_filePath = filePath;

            m_mimeTypes.Add("default", "application/octet-stream");
            m_mimeTypes.Add("txt", "text/plain");
            m_mimeTypes.Add("html", "text/html");
            m_mimeTypes.Add("htm", "text/html");
            m_mimeTypes.Add("jpg", "image/jpg");
            m_mimeTypes.Add("jpeg", "image/jpg");
            m_mimeTypes.Add("bmp", "image/bmp");
            m_mimeTypes.Add("gif", "image/gif");
            m_mimeTypes.Add("png", "image/png");

            m_mimeTypes.Add("ico", "image/vnd.microsoft.icon");
            m_mimeTypes.Add("css", "text/css");
            m_mimeTypes.Add("gzip", "application/x-gzip");
            m_mimeTypes.Add("zip", "multipart/x-zip");
            m_mimeTypes.Add("tar", "application/x-tar");
            m_mimeTypes.Add("pdf", "application/pdf");
            m_mimeTypes.Add("rtf", "application/rtf");
            m_mimeTypes.Add("xls", "application/vnd.ms-excel");
            m_mimeTypes.Add("ppt", "application/vnd.ms-powerpoint");
            m_mimeTypes.Add("doc", "application/application/msword");
            m_mimeTypes.Add("js", "application/javascript");
            m_mimeTypes.Add("au", "audio/basic");
            m_mimeTypes.Add("snd", "audio/basic");
            m_mimeTypes.Add("es", "audio/echospeech");
            m_mimeTypes.Add("mp3", "audio/mpeg");
            m_mimeTypes.Add("mp2", "audio/mpeg");
            m_mimeTypes.Add("mid", "audio/midi");
            m_mimeTypes.Add("wav", "audio/x-wav");
            m_mimeTypes.Add("swf", "application/x-shockwave-flash");
            m_mimeTypes.Add("avi", "video/avi");
            m_mimeTypes.Add("rm", "audio/x-pn-realaudio");
            m_mimeTypes.Add("ram", "audio/x-pn-realaudio");
            m_mimeTypes.Add("aif", "audio/x-aiff");
        }
Esempio n. 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 public RootPageStreamHandler(string httpMethod, string path, UserLoginService loginService)
 {
     m_loginService = loginService;
     m_httpMethod = httpMethod;
     m_path = path;
 }
Esempio n. 5
0
        private void HandleDefault(string module, string[] cmd)
        {
            List<string> args = new List<string>(cmd);
            args.RemoveAt(0);
            string[] cmdparams = args.ToArray();

            if (cmdparams.Length > 0)
            {
                if (cmdparams[0].ToLower() == "regions")
                {
                    UserLoginService loginService;
                    if (m_core.TryGet<UserLoginService>(out loginService))
                    {
                        string filename = cmdparams.Length > 1 ? cmdparams[1] : String.Empty;
                        m_loginService = loginService;
                        m_loginService.LoadDefaultRegionsFromFile(filename);
                    }
                }
                if (cmdparams[0].ToLower() == "logins")
                {
                    UserLoginService loginService;
                    if (m_core.TryGet<UserLoginService>(out loginService))
                    {
                        string filename = cmdparams.Length > 1 ? cmdparams[1] : String.Empty;
                        m_loginService = loginService;
                        m_loginService.LoadDefaultLoginsFromFile(filename);
                    }
                }
            }
        }
 public UserServerEventDispatchModule(UserManager userManager, MessageServersConnector messagesService, UserLoginService loginService)
 {
     m_userManager = userManager;
     m_messagesService = messagesService;
     m_loginService = loginService;
 }
Esempio n. 7
0
 /// <summary>
 /// Constructor
 /// </summary>
 public OpenIdUserPageStreamHandler(string httpMethod, string path, UserLoginService loginService)
 {
     m_httpMethod = httpMethod;
     m_path = path;
 }