示例#1
0
        /// <summary>
        /// Gets the raw value for the current property from Umbraco.
        /// </summary>
        /// <param name="context">
        /// An <see cref="DittoValueResolverContext" /> that provides a context.
        /// </param>
        /// <param name="attribute">
        /// The <see cref="DittoValueResolverAttribute"/> containing additional information
        /// indicating how to resolve the property.
        /// </param>
        /// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> to use as the current culture.</param>
        /// <returns>
        /// The <see cref="object"/> representing the raw value.
        /// </returns>
        internal virtual object ResolveValue(
            DittoValueResolverContext context,
            DittoValueResolverAttribute attribute,
            CultureInfo culture)
        {
            this.Content   = context.Instance as IPublishedContent;
            this.Context   = context;
            this.Attribute = attribute;
            this.Culture   = culture;

            return(this.ResolveValue());
        }
        /// <summary>
        /// Gets the raw value for the current property from Umbraco.
        /// </summary>
        /// <param name="context">
        /// An <see cref="DittoValueResolverContext" /> that provides a context.
        /// </param>
        /// <param name="attribute">
        /// The <see cref="DittoValueResolverAttribute"/> containing additional information 
        /// indicating how to resolve the property.
        /// </param>
        /// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> to use as the current culture.</param>
        /// <returns>
        /// The <see cref="object"/> representing the raw value.
        /// </returns>
        internal virtual object ResolveValue(
            DittoValueResolverContext context,
            DittoValueResolverAttribute attribute,
            CultureInfo culture)
        {
            this.Content = context.Instance as IPublishedContent;
            this.Context = context;
            this.Attribute = attribute;
            this.Culture = culture;

            return this.ResolveValue();
        }
 /// <summary>
 /// Gets the raw value for the current property from Umbraco.
 /// </summary>
 /// <param name="context">
 /// An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context.
 /// </param>
 /// <param name="attribute">
 /// The <see cref="DittoValueResolverAttribute"/> containing additional information 
 /// indicating how to resolve the property.
 /// </param>
 /// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> to use as the current culture.</param>
 /// <returns>
 /// The <see cref="object"/> representing the raw value.
 /// </returns>
 public abstract object ResolveValue(ITypeDescriptorContext context, DittoValueResolverAttribute attribute, CultureInfo culture);
 /// <summary>
 /// Gets the raw value for the current property from Umbraco.
 /// </summary>
 /// <param name="context">
 /// An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context.
 /// </param>
 /// <param name="attribute">
 /// The <see cref="DittoValueResolverAttribute"/> containing additional information
 /// indicating how to resolve the property.
 /// </param>
 /// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> to use as the current culture.</param>
 /// <returns>
 /// The <see cref="object"/> representing the raw value.
 /// </returns>
 public abstract object ResolveValue(ITypeDescriptorContext context, DittoValueResolverAttribute attribute, CultureInfo culture);