Beispiel #1
0
        protected override BuiltinContextsContainer GetBuiltinContexts(IRenderingContext context)
        {
            if(context == null)
              {
            throw new ArgumentNullException(nameof(context));
              }

              var originalAttrs = new Lazy<OriginalAttributeValuesCollection>(() => context.GetOriginalAttributes());
              return new MvcContextsContainer(this.GetKeywordOptions(),
                                      this.GetRepetitionSummaries(),
                                      originalAttrs,
                                      ViewContext);
        }
Beispiel #2
0
        /// <summary>
        /// Gets the builtin contexts, associated with the <c>CONTEXTS</c> root path keyword.
        /// </summary>
        /// <returns>The builtin contexts.</returns>
        /// <param name="context">The current rendering context.</param>
        protected virtual BuiltinContextsContainer GetBuiltinContexts(IRenderingContext context)
        {
            if(context == null)
              {
            throw new ArgumentNullException(nameof(context));
              }

              var originalAttrs = new Lazy<OriginalAttributeValuesCollection>(() => context.GetOriginalAttributes());
              return new BuiltinContextsContainer(this.GetKeywordOptions(),
                                          this.GetRepetitionSummaries(),
                                          originalAttrs,
                                          templateFileFactory: context.RenderingOptions.GetTemplateFileFactory(),
                                          model: this.ModelObject);
        }