Ejemplo n.º 1
0
        /// <summary>
        /// Initiates a content generation request to this source. The actual
        /// request format and the result depends the source type, which are
        /// provided by the derived classes.
        /// </summary>
        /// <param name="context">
        /// An instance of the <see cref="BuildSourceContext"/> class defining
        /// all the information for the content generation.
        /// </param>
        public virtual void Initialize(BuildSourceContext context)
        {
            BuildExceptions.NotNull(context, "context");

            if (_isInitialized)
            {
                return;
            }

            _sourceContext = context;
            _isInitialized = true;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BuildSource{T}"/> class
 /// with parameters copied from the specified instance of the
 /// <see cref="BuildSource{T}"/> class, a copy constructor.
 /// </summary>
 /// <param name="source">
 /// An instance of the <see cref="BuildSource{T}"/> class from which the
 /// initialization parameters or values will be copied.
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// If the parameter <paramref name="source"/> is <see langword="null"/>.
 /// </exception>
 protected BuildSource(BuildSource <T> source)
     : base(source)
 {
     _isInitialized = source._isInitialized;
     _sourceContext = source._sourceContext;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Signals the end of a content generation request. Any temporal
 /// disposable object created can be disposed.
 /// </summary>
 public virtual void Uninitialize()
 {
     _sourceContext = null;
     _isInitialized = false;
 }