示例#1
0
 public Cache(Cache cache)
 {
     cache_set = cache.cache_set;
 }
示例#2
0
        public Cache()
        {
            DataTable  default_settings = null;
            DataColumn column           = null;

            cache_set = new CacheSet();

            default_settings = new DataTable("DefaultSettings");

            column          = new DataColumn("StartDate");
            column.DataType = System.Type.GetType("System.DateTime");
            default_settings.Columns.Add(column);

            column          = new DataColumn("EndDate");
            column.DataType = System.Type.GetType("System.DateTime");
            default_settings.Columns.Add(column);

            column          = new DataColumn("CurrentDate");
            column.DataType = System.Type.GetType("System.DateTime");
            default_settings.Columns.Add(column);

            column          = new DataColumn("ProcessDate");
            column.DataType = System.Type.GetType("System.DateTime");
            default_settings.Columns.Add(column);

            column          = new DataColumn("ProcessName");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("Application");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("ProcessType");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("TempFileDirectory");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("MachineName");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column              = new DataColumn("ProcessState");
            column.DataType     = System.Type.GetType("System.String");
            column.DefaultValue = "EXECUTING";
            default_settings.Columns.Add(column);

            column              = new DataColumn("ProcessStatus");
            column.DataType     = System.Type.GetType("System.String");
            column.DefaultValue = "Process is running.";
            default_settings.Columns.Add(column);

            column          = new DataColumn("Arg1");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("Arg2");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("Arg3");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("Arg4");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("Arg5");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("Arg6");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("Arg7");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("Arg8");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            column          = new DataColumn("Arg9");
            column.DataType = System.Type.GetType("System.String");
            default_settings.Columns.Add(column);

            default_settings.Rows.Add(default_settings.NewRow());

            DataTable args = new DataTable("Args");

            column          = new DataColumn("Arg");
            column.DataType = System.Type.GetType("System.String");
            args.Columns.Add(column);

            Data.Add(default_settings);
            Data.Add(args);
        }