Esempio n. 1
0
        protected ScriptEngine(LanguageProvider provider, EngineOptions engineOptions, LanguageContext languageContext)
        {
            Contract.RequiresNotNull(provider, "provider");
            Contract.RequiresNotNull(engineOptions, "engineOptions");
            Contract.RequiresNotNull(languageContext, "languageContext");

#if !SILVERLIGHT // SecurityPermission
            if (engineOptions.ClrDebuggingEnabled)
            {
                // Currently, AssemblyBuilder.DefineDynamicModule requires high trust for emitting debug information.
                new System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode).Demand();
            }
#endif
            _provider        = provider;
            _options         = engineOptions;
            _languageContext = languageContext;
        }
Esempio n. 2
0
 internal RemoteLanguageProvider(LanguageProvider provider)
 {
     Debug.Assert(provider != null);
     _provider = provider;
 }