Example #1
0
 public override void Build(BuildingContext context)
 {
     foreach (var segment in Segments.OfType <FileSegmentBuilder>().Reverse())
     {
         segment.Build(context);
     }
 }
Example #2
0
        private void setupArgumentsAndSpread()
        {
            _arguments = new Lazy <RouteArgument[]>(() => Segments.OfType <RouteArgument>().ToArray());
            _spread    = Segments.OfType <Spread>().SingleOrDefault();

            if (!HasSpread)
            {
                return;
            }

            if (!Equals(_spread, Segments.Last()))
            {
                throw new ArgumentOutOfRangeException(nameof(Pattern),
                                                      "The spread parameter can only be the last segment in a route");
            }
        }
Example #3
0
 public IEnumerable <ImageModuleImport> GetAddedImports()
 {
     return(Segments.OfType <ImageModuleImport>());
 }
Example #4
0
 public T GetSegment <T>() where T : IGS1Item
 {
     return(Segments.OfType <T>().Select(item => item).SingleOrDefault());
 }