public bool IsReadOnly(string name) { if (Context.Context.InstanceVariables.Contains(name, StringComparer.Ordinal)) { return(FieldAccessor <Value> .IsReadOnly(this, name)); } return(instancevars[name].IsReadOnly); }
public bool CheckIndex(string name, int i1, int i2) { if (Context.Context.InstanceVariables.Contains(name, StringComparer.Ordinal)) { return(FieldAccessor <Value> .CheckIndex(this, name, i1, i2)); } return(instancevars[name].CheckIndex(i1, i2)); }
public Value GetLocalVar(string name, int i1, int i2) { if (Context.Context.InstanceVariables.Contains(name, StringComparer.Ordinal)) { return(FieldAccessor <Value> .GetNamedValue(this, name, i1, i2)); } return(instancevars[name][i1, i2]); }
private static FieldAccessor <T> GetFieldAccessor(Type t) { FieldAccessor <T> accessor; if (!FieldAccessors.TryGetValue(t, out accessor)) { FieldAccessors.Add(t, accessor = new FieldAccessor <T>(t)); } return(accessor); }
public static GetSetValue GetGlobalVariable(string name) { if (GlobalVariables.ContainsKey(name)) { return(GlobalVariables[name]); } var obj = FieldAccessor <Value> .ChooseObject(GlobalObjects, name); return(obj == null ? null : new VariableWrapper(obj, name)); }
public void SetLocalVar(string name, int i1, int i2, Value val) { if (Context.Context.InstanceVariables.Contains(name, StringComparer.Ordinal)) { FieldAccessor <Value> .SetNamedValue(this, name, val); } else if (instancevars.ContainsKey(name)) { instancevars[name][i1, i2] = val; } else { instancevars.Add(name, new Variable(i1, i2, val)); } }
public GetSetValue Variable(string name) { if (Context.Context.InstanceVariables.Contains(name, StringComparer.Ordinal)) { return(FieldAccessor <Value> .Variable(this, name)); } else if (instancevars.ContainsKey(name)) { return(instancevars[name]); } else { return(null); } }
public override bool CheckIndex(int i1, int i2) { return(FieldAccessor <Value> .CheckIndex(m_obj, m_name, i1, i2)); }
public override void Set(int i1, int i2, Value value) { FieldAccessor <Value> .SetNamedValue(m_obj, m_name, i1, i2, value); }
public override Value Get(int i1, int i2) { return(FieldAccessor <Value> .GetNamedValue(m_obj, m_name, i1, i2)); }
public static bool GlobalVariableExists(string name) { return(GlobalVariables.ContainsKey(name) || FieldAccessor <Value> .ChooseObject(GlobalObjects, name) != null); }