예제 #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);
        }
예제 #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;
 }
예제 #3
0
 public static RubyArray ConstructYamlSeq(IConstructor ctor, Node node) {
     return ctor.ConstructSequence(node);
 }
예제 #4
0
 public static RubyArray ConstructYamlSeq(IConstructor ctor, Node node)
 {
     return(ctor.ConstructSequence(node));
 }