Appcelerator.ServiceManager.ServiceManager C# (CSharp) Method

ServiceManager() public method

Initializes the service manager, loads assemblies from the deploy dir and adds a file system watcher to load new assemblies upon their creation
public ServiceManager ( ) : System
return System
        public ServiceManager()
        {
            //The directory to check for dlls to load
            deploydir = AppDomain.CurrentDomain.BaseDirectory + @"\..\app\services";

            if (!new DirectoryInfo(deploydir).Exists) Directory.CreateDirectory(deploydir);

            fsw = new FileSystemWatcher();
            fsw.Path = deploydir;
            fsw.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName;
            fsw.Created += new FileSystemEventHandler(fsw_Created);
            fsw.EnableRaisingEvents = true;

            LoadServiceHandlerAssemblies();

            RegisterServiceHandlers();
        }