コード例 #1
0
        public static SqliProccessor Create(RequestHandler handler, string key)
        {
            return new StringBasedProccessor(new BlitzRequestHandler(handler, key));

            // StringBasedProccessor is inherited from the abstract class SqliProccessor
            // So I have some basic functions in SqliProccessor and some other function that the המחלקה היורשת
            // have to implement. So no matter which Proccessor I return here I will still be able to use functions like
        }
コード例 #2
0
        public BlitzRequestHandler(RequestHandler handler, string key)
        {
            Handler = handler;

            Key = key;

            if(!Handler.Data.ContainsKey(key))
                throw new Exception("Unkown key");
        }