コード例 #1
0
ファイル: Docker.cs プロジェクト: naaturaz/SM
    private Structure GiveMeSourceForThisProd()
    {
        if (_order == null)
        {
            return(_person.FoodSource);
        }

        //looking for a Source that has the product
        var sourceSt = Dispatch.FindFoodSrcWithProd(_person, _order.Product);

        if (string.IsNullOrEmpty(sourceSt))
        {
            return(_person.FoodSource);
        }

        var source = Brain.GetStructureFromKey(sourceSt);

        //if not will default for the person FoodSource
        if (source == null)
        {
            source = _person.FoodSource;
        }

        return(source);
    }