Exemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: static void setInitialState(StateAwareSuspendableLifeCycle lifeCycle, LifeCycleState state) throws Throwable
        internal static void SetInitialState(StateAwareSuspendableLifeCycle lifeCycle, LifeCycleState state)
        {
            foreach (LifeCycleState lifeCycleState in LifeCycleState.values())
            {
                if (lifeCycleState.compareTo(state) <= 0)
                {
                    lifeCycleState.set(lifeCycle);
                }
            }
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Parameterized.Parameters(name = "From {0} and {1} to {2} should end in {3}") public static Iterable<Object[]> data()
        public static IEnumerable <object[]> Data()
        {
            IList <object[]> @params = new List <object[]>();

            foreach (LifeCycleState lifeCycleState in LifeCycleState.values())
            {
                foreach (SuspendedState suspendedState in SuspendedState.values())
                {
                    foreach (SuspendedState toSuspendedState in toSuspendedState())
                    {
                        @params.Add(new object[] { lifeCycleState, suspendedState, toSuspendedState, ExpectedResult(lifeCycleState, suspendedState, toSuspendedState) });
                    }
                }
            }
            return(@params);
        }