示例#1
0
        protected static baseDX Series(DataBars db, Types type, double period, string name)
        {
            //Build description
            string description = "(" + name + "," + period + ")";
            //See if it exists in the cache
            object obj = db.Cache.Find(description);

            if (obj != null)
            {
                return((baseDX)obj);
            }
            //Create DI, cache it, return it
            baseDX di = new baseDX(db, type, period, description);

            db.Cache.Add(description, di);
            return(di);
        }
示例#2
0
 protected static baseDX Series(DataBars db, Types type, double period, string name)
 {
     //Build description
     string description = "(" + name + "," + period + ")";
     //See if it exists in the cache
     object obj = db.Cache.Find(description);
     if (obj!=null) return (baseDX)obj;
     //Create DI, cache it, return it
     baseDX di = new baseDX(db, type, period, description);
     db.Cache.Add(description, di);
     return di;
 }