示例#1
0
        public static Agent StandUp(this AgentState state, Corporation corporation = null, ILocation initialLocation = null)
        {
            var idResolver = IdResolver.Empty;

            if (initialLocation != null)
            {
                state.Location = initialLocation.AsObjectReference();
                idResolver = new IdResolutionContext(new[] { initialLocation });
            }

            var builder = Agent.Builder.Build(state)
                .Resolve((r, a) => a.Corporation = corporation);

            return builder.Materialise(idResolver.RegisterTestSkills());
        }