public object Put(string key, object value_) { VMProxyArg vMProxyArg = (VMProxyArg)this.vmproxyhash[key]; object result; if (vMProxyArg != null) { result = vMProxyArg.setObject(this.wrappedContext, value_); } else if (this.localcontextscope) { this.localcontext[key] = value_; result = value_; } else if (this.localcontext.ContainsKey(key)) { this.localcontext[key] = value_; result = value_; } else { result = this.innerContext.Put(key, value_); } return(result); }
/// <summary> Impl of the Context.put() method. /// * /// </summary> /// <param name="key">name of item to set /// </param> /// <param name="value">object to set to key /// </param> /// <returns>old stored object /// /// </returns> public Object Put(String key, Object value_) { /* * first see if this is a vmpa */ VMProxyArg vmpa = (VMProxyArg)vmproxyhash[key]; if (vmpa != null) { return(vmpa.setObject(wrappedContext, value_)); } else { if (localcontextscope) { /* * if we have localcontextscope mode, then just * put in the local context */ return(localcontext[key] = value_); } else { /* * ok, how about the local context? */ if (localcontext.ContainsKey(key)) { return(localcontext[key] = value_); } else { /* * otherwise, let them push it into the 'global' context */ return(innerContext.Put(key, value_)); } } } }