public void Add(SymbolId name, object value) { throw new NotImplementedException(); }
/// <summary> /// Attempts to remove the name from the provided scope using the current language's semantics. /// </summary> public virtual bool RemoveName(CodeContext context, SymbolId name) { return(context.Scope.RemoveName(this, name)); }
/// <summary> /// Called when a lookup has failed and an exception should be thrown. Enables the /// language context to throw the appropriate exception for their language when /// name lookup fails. /// </summary> protected internal virtual Exception MissingName(SymbolId name) { return(new MissingMemberException(String.Format(CultureInfo.CurrentCulture, Resources.NameNotDefined, SymbolTable.IdToString(name)))); }
/// <summary> /// Determines if this context or any outer scope contains the defined name that /// is available from the provided LanguageContext. /// </summary> public bool ContainsName(LanguageContext context, SymbolId name) { object tmp; return(TryLookupName(context, name, out tmp)); }
/// <summary> /// Attemps to remove the provided name from this scope /// </summary> public bool TryRemoveName(SymbolId name) { return(TryRemoveName(InvariantContext.Instance, name)); }
/// <summary> /// Attempts to lookup the provided name in this scope or any outer scope. /// </summary> public bool TryLookupName(SymbolId name, out object value) { return(TryLookupName(InvariantContext.Instance, name, out value)); }
/// <summary> /// Sets the name to the specified value for the current context. /// </summary> /// <exception cref="MemberAccessException">The name has already been published and marked as ReadOnly</exception> public void SetName(SymbolId name, object value) { //if (_attrs != null) _attrs.CheckWritable(name); _dict[name] = value; }
protected internal override bool TryGetExtraValue(SymbolId key, out object value) { value = null; return(false); }
/// <summary> /// Trys to lookup the provided name in the current scope's context specific dictionary. /// Search includes names that are only visible to the provided LanguageContext. /// </summary> public bool TryGetNameForContext(LanguageContext context, SymbolId name, out object value) { value = null; return(false); }
public bool TryGetValue(SymbolId key, out object value) { lock (this) return(_data.TryGetValue(key, out value)); }
protected internal override bool TrySetExtraValue(SymbolId key, object value) { return(false); }
public bool Remove(SymbolId key) { lock (this) return(_data.Remove(key)); }
public bool ContainsKey(SymbolId key) { lock (this) return(_data.ContainsKey(key)); }
public void Add(SymbolId key, object value) { lock (this) _data.Add(key, value); }
public bool Remove(SymbolId name) { throw new NotImplementedException(); }
/// <summary> /// Sets the name to the specified value for the current context. /// /// Provides the ScopeMemberAttributes which should be set on the provided object. /// </summary> /// <exception cref="MemberAccessException">The name has already been published and marked as ReadOnly</exception> public void SetName(SymbolId name, object value, ScopeMemberAttributes attributes) { _dict[name] = value; }
public bool ContainsKey(SymbolId name) { throw new NotImplementedException(); }
/// <summary> /// Called from generated code, helper to do name lookup /// </summary> public static object LookupName(CodeContext context, SymbolId name) { return(context.Scope.LookupName(context.LanguageContext, name)); }
/// <summary> /// Attempts to lookup the provided name in this scope or any outer scope. If the /// name is not defined MissingMemberException is thrown. /// </summary> public object LookupName(SymbolId name) { return(LookupName(InvariantContext.Instance, name)); }
/// <summary> /// Called from generated code, helper to do name assignment. /// Order of parameters matches the codegen flow. /// </summary> public static object SetNameReorder(object value, CodeContext context, SymbolId name) { context.LanguageContext.SetName(context, name, value); return(value); }
/// <summary> /// Determines if this context or any outer scope contains the defined name. /// </summary> public bool ContainsName(SymbolId name) { return(ContainsName(InvariantContext.Instance, name)); }
/// <summary> /// Called from generated code, helper to do name assignment /// </summary> public static void SetName(CodeContext context, SymbolId name, object value) { context.LanguageContext.SetName(context, name, value); }
/// <summary> /// Removes the provided name from this scope /// </summary> public void RemoveName(SymbolId name) { RemoveName(InvariantContext.Instance, name); }
/// <summary> /// Called from generated code, helper to remove a name /// </summary> public static object RemoveName(CodeContext context, SymbolId name) { context.LanguageContext.RemoveName(context, name); return(null); }
/// <summary> /// Attempts to set the name in the provided scope using the current language's semantics. /// </summary> public virtual void SetName(CodeContext context, SymbolId name, object value) { context.Scope.SetName(name, value); }
public static void InitializeModuleField(CodeContext context, SymbolId name, ref ModuleGlobalWrapper wrapper) { ModuleGlobalCache mgc = context.LanguageContext.GetModuleCache(name); wrapper = new ModuleGlobalWrapper(context, mgc, name); }
/// <summary> /// Attemps to lookup a global variable using the language's semantics called from /// the provided Scope. The default implementation will attempt to lookup the variable /// at the host level. /// </summary> public virtual bool TryLookupGlobal(CodeContext context, SymbolId name, out object value) { return(ScriptDomainManager.CurrentManager.Host.TryGetVariable(Engine, name, out value)); }
protected internal abstract bool TryGetExtraValue(SymbolId key, out object value);