/// <summary>
        /// Captures properties from the given message template and
        /// provided values.
        /// </summary>
        public static TemplatePropertyList Capture(
            MessageTemplate template, params object[] values)
        {
            var binder = new Parameters.PropertyBinder(
                new Parameters.PropertyValueConverter(
                    10,
                    Enumerable.Empty <Type>(),
                    Enumerable.Empty <IDestructuringPolicy>()));

            return(binder.ConstructProperties(template, values));
        }
        /// <summary>
        /// Captures properties from the given message template and
        /// provided values.
        /// </summary>
        public static TemplatePropertyList CaptureWith(
            int maximumDepth, IEnumerable <Type> additionalScalarTypes,
            IEnumerable <IDestructuringPolicy> additionalDestructuringPolicies,
            MessageTemplate template, params object[] values)
        {
            var binder = new Parameters.PropertyBinder(
                new Parameters.PropertyValueConverter(
                    maximumDepth,
                    additionalScalarTypes ?? Enumerable.Empty <Type>(),
                    additionalDestructuringPolicies ?? Enumerable.Empty <IDestructuringPolicy>()));

            return(binder.ConstructProperties(template, values));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Captures properties from the given message template and 
        /// provided values.
        /// </summary>
        public static IEnumerable<TemplateProperty> CaptureWith(
            int maximumDepth, IEnumerable<Type> additionalScalarTypes,
            IEnumerable<Core.IDestructuringPolicy> additionalDestructuringPolicies,
            MessageTemplate template, params object[] values)
        {
            var binder = new Parameters.PropertyBinder(
                new Parameters.PropertyValueConverter(
                    maximumDepth,
                    additionalScalarTypes ?? Enumerable.Empty<Type>(),
                    additionalDestructuringPolicies ?? Enumerable.Empty<Core.IDestructuringPolicy>()));

            return binder.ConstructProperties(template, values);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Captures properties from the given message template and 
        /// provided values.
        /// </summary>
        public static IEnumerable<TemplateProperty> Capture(
            MessageTemplate template, params object[] values)
        {
            var binder = new Parameters.PropertyBinder(
                new Parameters.PropertyValueConverter(
                    10,
                    Enumerable.Empty<Type>(),
                    Enumerable.Empty<Core.IDestructuringPolicy>()));

            return binder.ConstructProperties(template, values);
        }