Schedule() public method

Schedules the specified method for invocation in the main.
public Schedule ( MosaMethod method ) : void
method MosaMethod The method.
return void
コード例 #1
0
        /// <summary>
        /// Initializes the type.
        /// </summary>
        protected virtual void InitializeType()
        {
            if (Method.IsSpecialName && Method.IsRTSpecialName && Method.IsStatic && Method.Name == ".cctor")
            {
                typeInitializer = Compiler.PostCompilePipeline.FindFirst<TypeInitializerSchedulerStage>();

                if (typeInitializer == null)
                    return;

                typeInitializer.Schedule(Method);
            }
        }
コード例 #2
0
        /// <summary>
        /// Initializes the type.
        /// </summary>
        protected virtual void InitializeType()
        {
            typeInitializer = Compiler.Pipeline.FindFirst<TypeInitializerSchedulerStage>();

            if (typeInitializer == null)
                return;

            // If we're compiling a type initializer, run it immediately.
            if (Method.IsSpecialName && Method.IsRTSpecialName && Method.IsStatic && Method.Name == ".cctor")
            {
                typeInitializer.Schedule(Method);
            }
        }