Exemple #1
0
        /// <summary>
        ///   Initializes a new instance of the GraphService class.
        /// </summary>
        /// <param name='fallen8'> Fallen-8. </param>
        public GraphService(Fallen8 fallen8)
        {
            _fallen8 = fallen8;

            _compilerParameters = new CompilerParameters
            {
                GenerateExecutable      = false,
                GenerateInMemory        = true,
                TreatWarningsAsErrors   = false,
                IncludeDebugInformation = false,
                CompilerOptions         = "/optimize /target:library",
            };

            var curAss = Assembly.GetAssembly(fallen8.GetType());

            _compilerParameters.ReferencedAssemblies.Add("System.dll");
            _compilerParameters.ReferencedAssemblies.Add("mscorlib.dll");
            _compilerParameters.ReferencedAssemblies.Add("System.dll");
            _compilerParameters.ReferencedAssemblies.Add("System.Data.dll");
            _compilerParameters.ReferencedAssemblies.Add(curAss.Location);

            _codeProvider = new CSharpCodeProvider(new Dictionary <string, string>
            {
                { "CompilerVersion", "v4.0" }
            });
        }
Exemple #2
0
        /// <summary>
        ///   Initializes a new instance of the GraphService class.
        /// </summary>
        /// <param name='fallen8'> Fallen-8. </param>
        public GraphService(Fallen8 fallen8)
        {
            _fallen8 = fallen8;

            _compilerParameters = new CompilerParameters {
                GenerateExecutable = false,
                GenerateInMemory = true,
                TreatWarningsAsErrors = false,
                IncludeDebugInformation = false,
                CompilerOptions = "/optimize /target:library",
            };

            var curAss = Assembly.GetAssembly (fallen8.GetType ());
            _compilerParameters.ReferencedAssemblies.Add ("System.dll");
            _compilerParameters.ReferencedAssemblies.Add ("mscorlib.dll");
            _compilerParameters.ReferencedAssemblies.Add ("System.dll");
            _compilerParameters.ReferencedAssemblies.Add ("System.Data.dll");
            _compilerParameters.ReferencedAssemblies.Add (curAss.Location);

            _codeProvider = new CSharpCodeProvider (new Dictionary<string, string> { { "CompilerVersion", "v4.5" }
                                                      });
        }