public static MutableString /*!*/ Inspect(RubyContext /*!*/ context, TypeGroup /*!*/ self) { var result = MutableString.CreateMutable(context.GetIdentifierEncoding()); result.Append("#<TypeGroup: "); bool isFirst = true; foreach (var entry in self.TypesByArity.ToSortedList((x, y) => x.Key - y.Key)) { Type type = entry.Value; if (!isFirst) { result.Append(", "); } else { isFirst = false; } result.Append(context.GetTypeName(type, true)); } result.Append('>'); return(result); }
public override string GetTypeName(Type /*!*/ t) { return(_context.GetTypeName(t, true)); }
public static MutableString/*!*/ Inspect(RubyContext/*!*/ context, TypeGroup/*!*/ self) { var result = MutableString.CreateMutable(RubyEncoding.ClassName); result.Append("#<TypeGroup: "); bool isFirst = true; foreach (var entry in self.TypesByArity.ToSortedList((x, y) => x.Key - y.Key)) { Type type = entry.Value; if (!isFirst) { result.Append(", "); } else { isFirst = false; } result.Append(context.GetTypeName(type, true)); } result.Append('>'); return result; }
public static Exception/*!*/ MakeTypeConversionError(RubyContext/*!*/ context, object value, Type/*!*/ type) { return RubyExceptions.CreateTypeConversionError(context.GetClassDisplayName(value), context.GetTypeName(type, true)); }