C#开发的IEnumerable接口
C#开发的IEnumerable接口
在前面分析中,我们会遇到下面这行代码:
var refineries = self.World.ActorsWithTrait<IAcceptResources>()
.Where(r => r.Actor != ignore && r.Actor.Owner == self.Owner && IsAcceptableProcType(r.Actor))
.Select(r => new
{
Location = r.Actor.Location + r.Trait.DeliveryOffset,