예제 #1
0
        public void Register <TBootstrapSegment>() where TBootstrapSegment : IBootstrapSegment, new()
        {
            var segment = new TBootstrapSegment();

            segment.Register(this);
            _segments.Add(segment);
        }
예제 #2
0
        public void Register <TBootstrapSegment>() where TBootstrapSegment : IBootstrapSegment, new()
        {
            var type = typeof(TBootstrapSegment);

            if (_types.Contains(type))
            {
                return;
            }

            _types.Add(type);

            var segment = new TBootstrapSegment();

            segment.Register(this);
            _segments.Add(segment);
        }