aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Scripting/ExpressionGenerator.cs
blob: 8db917a100fb4e423da6becd55cd8ae0add79717 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using Microsoft.CodeAnalysis.CSharp.Scripting;
using Microsoft.CodeAnalysis.Scripting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Tango.Scripting
{
    public static class ExpressionGenerator
    {
        public static Func<T, bool> GenerateExpression<T>(String body, params Assembly[] assemblies)
        {
            var options = ScriptOptions.Default.AddReferences(assemblies);
            Func<T, bool> func = CSharpScript.EvaluateAsync<Func<T, bool>>(body, options).Result;
            return func;
        }
    }
}
span class="p">} = true; public bool CreateDeploymentSlot { get; set; } = true; public bool CreateDatabase { get; set; } = true; public bool AddDatabasePermissionsForEnvironmentGroup { get; set; } = true; public bool CreateDatabaseBackupUser { get; set; } = true; public bool CreateDatabaseTangoWebApplicationUser { get; set; } = true; public bool SynchronizeDatabaseSchema { get; set; } = true; public bool SynchronizeDatabaseData { get; set; } = true; public bool CreateStorageContainers { get; set; } = true; public bool CopyStorageBlobs { get; set; } = true; public bool CopyMachineServiceFiles { get; set; } = true; public bool IgnoreExistingSlot { get; set; } = false; public bool ConfigureMachineServiceLogging { get; set; } = true; public bool ConfigureCloudBackup { get; set; } = true; } }