コード例 #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);
        }