Exemplo n.º 1
0
 public static IList UniqueSelf(UnaryOpStorage/*!*/ hashStorage, BinaryOpStorage/*!*/ eqlStorage, RubyArray/*!*/ self) {
     self.RequireNotFrozen();
     return UniqueSelf(hashStorage, eqlStorage, (IList)self);
 }
Exemplo n.º 2
0
 public static IList FlattenInPlace(ConversionStorage<IList>/*!*/ tryToAry, RubyArray/*!*/ self) {
     self.RequireNotFrozen();
     return FlattenInPlace(tryToAry, (IList)self);
 }
Exemplo n.º 3
0
 public static IList FlattenInPlace(ConversionStorage<IList>/*!*/ tryToAry, RubyArray/*!*/ self, [DefaultProtocol, DefaultParameterValue(-1)] int maxDepth) {
     self.RequireNotFrozen();
     return FlattenInPlace(tryToAry, (IList)self, maxDepth);
 }
Exemplo n.º 4
0
 public static RubyArray ShuffleInPlace(RubyContext/*!*/ context, RubyArray/*!*/ self)
 {
     self.RequireNotFrozen();
     var generator = context.RandomNumberGenerator;
     for (int i = self.Count - 1; i >= 0; i--) {
         int j = generator.Next(i + 1);
         object value = self[i];
         self[i] = self[j];
         self[j] = value;
     }
     return self;
 }