Example #1
0
        /// <summary>
        /// Extracts metadata information associtated with the CLR assembly.
        /// </summary>
        /// <exception cref="InvalidScriptAssemblyException">The assembly is invalid.</exception>
        private static ScriptAssemblyAttribute /*!*/ GetAttribute(Assembly /*!*/ realAssembly)
        {
            ScriptAssemblyAttribute result = ScriptAssemblyAttribute.Reflect(realAssembly);

            if (result == null)
            {
                throw new InvalidScriptAssemblyException(realAssembly);
            }

            return(result);
        }
Example #2
0
        /// <summary>
        /// Gets a script type stored in a specified single-script assembly.
        /// </summary>
        internal Type /*!*/ GetScriptType()
        {
            if (this.scriptType == null)
            {
                var attr = ScriptAssemblyAttribute.Reflect(RealModule.Assembly);
                Debug.Assert(attr != null);
                Debug.Assert(!attr.IsMultiScript);
                Debug.Assert(attr.SSAScriptType != null);

                this.scriptType = attr.SSAScriptType;
                Debug.Assert(this.scriptType != null);
            }
            return(this.scriptType);
        }