예제 #1
0
 public _BlockScope(Block block)
 {
     _block      = block;
     _old_scope  = null;
     _name_scope = null;
     _counter    = new Dictionary <string, int>();
 }
예제 #2
0
 public Block(string prefix, ParameterDict @params)
 {
     (Prefix, Params)   = _BlockScope.Create(prefix, @params, Alias());
     Name               = prefix != null && prefix.EndsWith("_") ? prefix.Substring(0, prefix.Length - 1) : prefix;
     _scope             = new _BlockScope(this);
     _childrens         = new Dictionary <string, Block>();
     _reg_params        = new Dictionary <string, Parameter>();
     _forward_hooks     = new Dictionary <int, Hook>();
     _forward_pre_hooks = new Dictionary <int, Hook>();
 }
예제 #3
0
        public override MxDisposable With()
        {
            if (string.IsNullOrWhiteSpace(_block.Prefix))
            {
                return(null);
            }

            _old_scope  = _current.Value;
            _name_scope = new Prefix(_block.Prefix);
            _name_scope.With();
            return(this);
        }