/// <summary>
 /// Adds an extension to the collection of extension.
 /// </summary>
 /// <param name="extension">The extension to add.</param>
 /// <remarks>This is a convenience function.</remarks>
 public void AddExtensionIgnoreAssembly(Extension extension)
 {
     Extensions.Add(extension);
 }
        /// <summary>
        /// Adds an extension to the collection of extensions, and the assembly of its type to
        /// the <see cref="CustomAssemblies"/> dictionary.
        /// </summary>
        /// <param name="extension">The extension to add.</param>
        /// <remarks>This is a convenience function.</remarks>
        public void AddExtension(Extension extension)
        {
            // Add the extension
            AddExtensionIgnoreAssembly(extension);

            // And its assembly
            var extensionAssembly = extension.GetExtensionType().Assembly;
            CustomAssemblies[extensionAssembly.FullName] = extensionAssembly.ManifestModule.FullyQualifiedName;
        }
        private Evaluator CreateExpressionEvaluator()
        {
            var meta = new ExpressionMeta("VisualBasic");

            // Expressions
            string expression;
            foreach (var candidate in GetPossibleExpressions())
                if (LocalReportsEngineCommon.IsExpression(candidate, out expression))
                    meta.AddExpression(expression);

            // TODO: Extensions
            var extension = new Extension();
            extension.Name = "Parameters";
            extension.Instance = new ReadOnlyParameterCollection(ReportParameters);
            meta.AddExtension(extension);

            // TODO: Async compile in Evaluator

            return meta.Compile();
        }