Example #1
0
        public static Cache.Set.ISet Create(int numberOfLines, int wordsInLine, int wordSize)
        {
            Cache.Set.ISet setProxy      = null;
            string         setImplConfig = ConfigurationManager.AppSettings["SetImplementation"];

            if (setImplConfig.Equals("CLI"))
            {
                setProxy = new CacheSet.SetProxy(numberOfLines, wordsInLine, wordSize);
            }
            else if (setImplConfig.Equals("C#"))
            {
                setProxy = new Cache.Set.Cs.SetProxy(numberOfLines, wordsInLine, wordSize);
            }
            else
            {
                throw new ArgumentOutOfRangeException("incorrect app config for SetProxy");
            }
            return(setProxy);
        }
Example #2
0
 public Set(int numberOfLines, int wordsInLine, int wordSize, int id)
 {
     id_ = id;
     Cache.Set.ISet setProxy = SetFactory.Create(numberOfLines, wordsInLine, wordSize);
     setProxy_ = setProxy;
 }