Пример #1
0
        public static string HashString(string input)
        {
            var adapter = new HashAdapter(new HashAdaptee());
            var result  = adapter.RequestDelegate(input);

            if (!result.Equals(""))
            {
                return(result);
            }
            var adapter2 = new HashAdapter(new HashTarget());

            return(adapter2.RequestDelegate(input));
        }
Пример #2
0
        public bool isNew()
        {
            Field field;

            if (this.IsUsingAdapter)
            {
                HashAdapter adapter = (HashAdapter)this.getBoxView();
                field = (Field)adapter[this.IdField];
            }
            else
            {
                field = (Field)this[this.IdField];
            }
            return(field.IsEmpty());
        }
Пример #3
0
 protected void UseAdapter()
 {
     this.Adapter = new HashAdapter();
     this.Adapter.setTarget(this);
 }