public FuzzyString(byte[] raw) { this.raw = raw; this.encoding = Encoding.Default; this.setByRaw = true; this.ClassName = FuzzySymbol.GetSymbol("String"); }
public FuzzyString(byte[] raw, Encoding encoding) { this.raw = raw; this.encoding = encoding; this.setByRaw = true; this.ClassName = FuzzySymbol.GetSymbol("String"); }
protected FuzzyClass(string s) { this.name = s; this.symbol = FuzzySymbol.GetSymbol(s); this.ClassName = FuzzySymbol.GetSymbol("Class"); classes.Add(s, this); }
protected FuzzyModule(string s) { this.name = s; this.symbol = FuzzySymbol.GetSymbol(s); this.ClassName = FuzzySymbol.GetSymbol("Module"); modules.Add(s, this); }
public FuzzyString(string unicodeText) { this.encoding = Encoding.Unicode; this.str = unicodeText; this.setByText = true; this.ClassName = FuzzySymbol.GetSymbol("String"); this.Encoding = Encoding.UTF8; }
public FuzzyTable(int x_size, int y_size, int z_size) { value = new short[x_size, y_size, z_size]; this.x_size = x_size; this.y_size = y_size; this.z_size = z_size; this.dimension = 3; this.ClassName = FuzzySymbol.GetSymbol("Table"); }
/// <summary> /// 从source中将自身变成目标的拷贝 /// </summary> /// <param name="source">拷贝源</param> public virtual void Clone(FuzzyObject source) { this.className = source.className; object Value; this.InstanceVariables.Clear(); foreach (FuzzySymbol key in source.InstanceVariables.Keys) { Value = source.InstanceVariables[key]; this.InstanceVariables.Add(Dup(key) as FuzzySymbol, Dup(Value)); } }
public object this[string str] { get { FuzzySymbol sym = FuzzySymbol.GetSymbol(str); return(this[sym]); } set { FuzzySymbol sym = FuzzySymbol.GetSymbol(str); this[sym] = value; } }
public static FuzzySymbol GetSymbol(FuzzyString str) { string s = str.Text; if (symbols.ContainsKey(s)) { return(symbols[s]); } FuzzySymbol sym = new FuzzySymbol(s); sym.rubyString = str; return(sym); }
public object this[FuzzySymbol sym] { get { if (InstanceVariables.ContainsKey(sym)) { return(InstanceVariables[sym]); } else { return(null); } } set { if (InstanceVariables.ContainsKey(sym)) { InstanceVariables[sym] = value; } } }
public object this[FuzzySymbol key] { get { return(obj.InstanceVariables.ContainsKey(key) ? obj.InstanceVariables[key] is FuzzyNil ? null : obj.InstanceVariables[key] : null); } set { if (obj.InstanceVariables.ContainsKey(key)) { obj.InstanceVariables[key] = value; } else { obj.InstanceVariables.Add(key, value); } } }
private FuzzyNil() { this.ClassName = FuzzySymbol.GetSymbol("NilClass"); }
public FuzzyRegexp(FuzzyString Pattern, FuzzyRegexpOptions Options) { this.Pattern = Pattern; this.Options = Options; this.ClassName = FuzzySymbol.GetSymbol("Regexp"); }
public FuzzyArray(int capacity) { list = new List <object>(capacity); this.ClassName = FuzzySymbol.GetSymbol("Array"); }
public FuzzyArray(IEnumerable <object> collection) { list = new List <object>(collection); this.ClassName = FuzzySymbol.GetSymbol("Array"); }
public FuzzyArray() { list = new List <object>(); this.ClassName = FuzzySymbol.GetSymbol("Array"); }
static FuzzySymbol() { FuzzySymbol.SymbolClassName = new FuzzySymbol(0.0f); }
public FuzzyHash(object DefaultValue) : base() { this.defaultValue = DefaultValue; this.ClassName = FuzzySymbol.GetSymbol("Hash"); }
private FuzzyBool(bool t) { value = t; this.ClassName = FuzzySymbol.GetSymbol("Bool"); }
public FuzzyFloat(float value) { this.value = value; this.ClassName = FuzzySymbol.GetSymbol("Float"); }
public FuzzyFixnum(int value) { this.value = value; this.ClassName = FuzzySymbol.GetSymbol("Fixnum"); }
public static FuzzyModule GetModule(FuzzySymbol s) { return(GetModule(s.GetString())); }
public static FuzzyClass GetClass(FuzzySymbol s) { return(GetClass(s.GetString())); }
public FuzzyStruct() : base() { this.ClassName = FuzzySymbol.GetSymbol("Struct"); }
public object this[FuzzyString key] { get { return(this[FuzzySymbol.GetSymbol(key)]); } set { this[FuzzySymbol.GetSymbol(key)] = value; } }