/// <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; }
/// <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; }
/// <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; }