public LineDefCrusherType(Trigger trigger, Repeatable repeatable, Speed speed, MonsterActivate monsterActivate, Silent silent, CrusherAction action) : base(Category.Crusher) { this.trigger = trigger; this.repeatable = repeatable; this.speed = speed; this.monsterActivate = monsterActivate; this.silent = silent; this.action = action; }
private static string ConcatStrings(string normalParameter, Repeatable <string> repeatable) { if (repeatable == null) { return(normalParameter); } return(repeatable.Aggregate(normalParameter, (current, str) => current + str)); }
public LineDefDoorType(Trigger trigger, Repeatable repeatable, Lock lockType, Speed speed, int wait, MonsterActivate monsterActivate, DoorAction doorAction) : base(Category.Door) { this.trigger = trigger; this.repeatable = repeatable; this.lockType = lockType; this.speed = speed; this.wait = wait; this.monsterActivate = monsterActivate; this.doorAction = doorAction; }
public LineDefLiftType(Trigger trigger, Repeatable repeatable, int wait, Speed speed, TextureChange textureChange, Model model, MonsterActivate monsterActivate, LiftTarget target) : base(Category.Lift) { this.trigger = trigger; this.repeatable = repeatable; this.speed = speed; this.textureChange = textureChange; this.model = model; this.monsterActivate = monsterActivate; this.target = target; }
public void TestRepeatedGet() { int[] testInput = new[] { 1, 2, 3 }; Repeatable <int> repeatable = testInput; // 1. Try CollectionAssert.AreEqual(testInput, repeatable); // 2. Try CollectionAssert.AreEqual(testInput, repeatable); }
public LineDefFloorType(Trigger trigger, Repeatable repeatable, Direction direction, Speed speed, TextureChange textureChange, Model model, MonsterActivate monsterActivate, Crush crush, FloorTarget target) : base(Category.Floor) { this.trigger = trigger; this.repeatable = repeatable; this.direction = direction; this.speed = speed; this.textureChange = textureChange; this.model = model; this.monsterActivate = monsterActivate; this.crush = crush; this.target = target; }
public void TestModifiedSource() { int[] testInput = new[] { 1, 2, 3 }; var testList = new List <int>(testInput); Repeatable <int> repeatable = testList; // Normal access. CollectionAssert.AreEqual(testInput, repeatable); // Modified list. testList.RemoveAt(0); CollectionAssert.AreEqual(testInput, repeatable); }
private System.Object underlyingObject; // The underlying HAPI object /// <summary>Constructor for FiniteList</summary> /// <param name="repType">the Class which is repeating /// </param> /// <param name="underlyingObject">the underlying object that the extending class represents /// </param> public FiniteList(System.Type repType, System.Object underlyingObject) { this.repType = repType; this.underlyingObject = underlyingObject; Repeatable firstRep = createRep(0); this.maxReps = firstRep.MaxReps; this.minReps = firstRep.MinReps; reps = new System.Collections.ArrayList(); reps.Add(firstRep); createNewReps(maxReps); }
public Job(JobType type, Repeatable repeateJob, int frequency, float price, string notes) { Type = type; RepeateJob = repeateJob; if (RepeateJob == Repeatable.Yes) { Frequency = frequency; } else { Frequency = 0; } Price = price; Notes = notes; }
/// <summary>Creates the repition</summary> /// <param name="rep">the number representing which repition /// </param> private Repeatable createRep(int rep) { try { System.Reflection.ConstructorInfo theCon = repType.GetConstructors()[0]; Repeatable thisRep = (Repeatable)theCon.Invoke(new System.Object[] { underlyingObject, (System.Int32)rep }); return(thisRep); } catch (System.Reflection.TargetInvocationException e) { throw new ConformanceError("Error creating underlying repetition. This is a bug.\nError is: " + e.ToString() + "\n" + e.InnerException.Message); } catch (System.Exception e) { throw new ConformanceError("Error creating underlying repetition. This is a bug. Error is: " + e.ToString()); } }
private static string ConcatStrings(string normalParameter, Repeatable<string> repeatable) { if (repeatable == null) { return normalParameter; } return repeatable.Aggregate(normalParameter, (current, str) => current + str); }