Пример #1
0
        public Request(LISpMiner miner, HttpContextBase httpContext)
            : this(httpContext)
        {
            if (miner != null)
            {
                this.DataFolder = String.Format("{0}/xml", miner.LMPrivatePath);

                this.LISpMiner = miner;
            }
        }
Пример #2
0
        internal LMSwbImporter(LISpMiner lispMiner, ODBC.ConnectionString connectionString, string lmPrivatePath)
            : base()
        {
            this.LISpMiner = lispMiner;
            this.LMExecutablesPath = this.LISpMiner.LMExecutablesPath;
            this.LMPrivatePath = lmPrivatePath;
            this.OdbcConnectionString = connectionString.Value;

            this.ApplicationName = "LMSwbImporter.exe";
            this.AppLog = String.Format("{0}-{1}.dat", "_AppLog_importer", Guid.NewGuid());
        }
Пример #3
0
        internal LMProcPooler(LISpMiner lispMiner, ODBC.ConnectionString connectionString, string lmPrivatePath)
            : base()
        {
            this.LISpMiner = lispMiner;
            this.LMExecutablesPath = this.LISpMiner.LMExecutablesPath;
            this.LMPrivatePath = lmPrivatePath;
            this.OdbcConnectionString = connectionString.Value;

            this.ApplicationName = "LMProcPooler.exe";
            this.AppLog = String.Format("{0}-{1}.dat", "_AppLog_LMProcPooler", Guid.NewGuid());
            this.CancelAll = false;
            // this.TimeOut = 10;
        }
Пример #4
0
        internal LMSwbExporter(LISpMiner lispMiner, ODBC.ConnectionString connectionString, string lmPrivatePath)
            : base()
        {
            this.LISpMiner = lispMiner;
            this.LMExecutablesPath = this.LISpMiner.LMExecutablesPath;
            this.LMPrivatePath = lmPrivatePath;
            this.OdbcConnectionString = connectionString.Value;

            this.ApplicationName = "LMSwbExporter.exe";
            this.AppLog = String.Format("{0}-{1}.dat", "_AppLog_exporter", Guid.NewGuid());

            this.NoAttributeDisctinctValues = false;
            this.NoEscapeSeqUnicode = false;
        }
Пример #5
0
 private static void CopyToPool(Environment environment, LISpMiner miner)
 {
     if (!miner.SharedPool)
     {
         DirectoryUtil.Copy(environment.LMPath, miner.LMExecutablesPath);
     }
     else
     {
         Directory.CreateDirectory(miner.LMPrivatePath);
     }
 }
Пример #6
0
        private static void Remove()
        {
            var env = new LMWrapper.Environment
                      	{
                      		//LMPoolPath = String.Format(@"{0}", @"C:\LMs\"),
                      		LMPoolPath = String.Format(@"{0}", @"c:\LMs"),
                      		LMPath = String.Format("{0}/../{1}", System.AppDomain.CurrentDomain.BaseDirectory, "LISp Miner"),
                      	};

            foreach (var path in Directory.GetDirectories(env.LMPoolPath))
            {
                try
                {
                    var directory = new DirectoryInfo(path);
                    var lm = new LISpMiner(directory, env);

                    lm.Dispose();

                    Console.WriteLine(lm.Id);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(String.Format("skipping {0} {1}", path, ex.Message));
                }
            }
        }
Пример #7
0
        protected static void RegisterExisting()
        {
            var env = MvcApplication.Environment;

            if (!Directory.Exists(env.LMPoolPath)) return;

            foreach (var path in Directory.GetDirectories(env.LMPoolPath))
            {
                try
                {
                    var directory = new DirectoryInfo(path);
                    var lm = new LISpMiner(directory, env);

                    if (!env.Exists(lm.Id))
                    {
                        env.Register(lm);
                    }
                }
                catch
                {
                    continue;
                }
            }
        }
Пример #8
0
 public LISpMinerResponse(LISpMiner miner)
 {
     this.LISpMiner = miner;
 }