AnalysisEngine.Writer.getInstance C# (CSharp) Method

getInstance() public static method

public static getInstance ( ) : Writer
return Writer
        public static Writer getInstance()
        {
            if (instance == null)
            {
                instance = new Writer();
                return instance;
            }
            else
            {
                return instance;
            }
        }

Usage Example

Beispiel #1
0
        public FileWatchers()
        {
            systemp = sysroot + "temp\\";
            //c:\Windows
            psexecWatcher                       = new FileSystemWatcher();
            psexecWatcher.Path                  = sysroot;
            psexecWatcher.Filter                = "*.*";
            psexecWatcher.NotifyFilter          = NotifyFilters.FileName | NotifyFilters.Size;
            psexecWatcher.IncludeSubdirectories = false;
            psexecWatcher.Changed              += new FileSystemEventHandler(psexecChanged);
            psexecWatcher.EnableRaisingEvents   = true;

            //%temp%
            exploitWatcher                       = new FileSystemWatcher();
            exploitWatcher.Path                  = usertemp;
            exploitWatcher.Filter                = "*.*";
            exploitWatcher.NotifyFilter          = NotifyFilters.FileName | NotifyFilters.Size;
            exploitWatcher.IncludeSubdirectories = true;
            exploitWatcher.Changed              += new FileSystemEventHandler(exploitChanged);
            exploitWatcher.EnableRaisingEvents   = true;

            //c:\windows\temp
            systempWatcher                       = new FileSystemWatcher();
            systempWatcher.Path                  = systemp;
            systempWatcher.Filter                = "*.*";
            systempWatcher.NotifyFilter          = NotifyFilters.FileName | NotifyFilters.Size;
            systempWatcher.IncludeSubdirectories = false;
            systempWatcher.Changed              += new FileSystemEventHandler(systempChanged);
            systempWatcher.EnableRaisingEvents   = true;

            w = Writer.getInstance();
        }
All Usage Examples Of AnalysisEngine.Writer::getInstance