Beispiel #1
0
 void OnDeserialized(StreamingContext ctx)
 {
     if (ReferencedNames == null)
     {
         ReferencedNames = new AssemblyNameList();
     }
 }
Beispiel #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="engine">The script engine</param>
        /// <param name="enableDebug">Whether to enable dbeug</param>
        /// <param name="referencedAssemblies">Referenced assemblies</param>
        /// <param name="script">The script code</param>
        /// <param name="uuid">The uuid of the script</param>
        public ScriptContainer(string engine, Guid uuid, string script,
                               bool enableDebug, IEnumerable <AssemblyName> referencedAssemblies)
        {
            if (script == null)
            {
                Script = "";
            }
            else
            {
                Script = script;
            }

            Engine      = engine;
            Uuid        = uuid;
            EnableDebug = enableDebug;

            ReferencedNames = new AssemblyNameList(referencedAssemblies);
        }