Example #1
0
        public static object ConstructSpecializedSequence(IConstructor ctor, string pref, Node node)
        {
            RubyArray result = null;

            try {
                result = (RubyArray)Type.GetType(pref).GetConstructor(Type.EmptyTypes).Invoke(null);
            } catch (Exception e) {
                throw new ConstructorException("Can't construct a sequence from class: " + pref, e);
            }
            foreach (object x in ctor.ConstructSequence(node))
            {
                result.Add(x);
            }
            return(result);
        }
Example #2
0
 public static object ConstructSpecializedSequence(IConstructor ctor, string pref, Node node) {
     RubyArray result = null;
     try {
         result = (RubyArray)Type.GetType(pref).GetConstructor(Type.EmptyTypes).Invoke(null);
     } catch (Exception e) {
         throw new ConstructorException("Can't construct a sequence from class: " + pref, e);
     }
     foreach (object x in ctor.ConstructSequence(node)) {
         result.Add(x);
     }
     return result;
 }
Example #3
0
 public static RubyArray ConstructYamlSeq(IConstructor ctor, Node node) {
     return ctor.ConstructSequence(node);
 }
Example #4
0
 public static RubyArray ConstructYamlSeq(IConstructor ctor, Node node)
 {
     return(ctor.ConstructSequence(node));
 }