public static void GenerateTimedEmit(ICodeBlock codeBlock, NamedObjectSave nos)
 {
     if (!nos.IsDisabled && nos.AddToManagers && !nos.DefinedByBase && nos.IsEmitter())
     {
         codeBlock.Line(nos.InstanceName + ".TimedEmit();");
     }
 }
Пример #2
0
        public static void GenerateTimedEmit(ICodeBlock codeBlock, NamedObjectSave nos)
        {

            if (!nos.IsDisabled && nos.AddToManagers && nos.IsEmitter() && nos.GenerateTimedEmit)
            {

                var timedEmitBlock = codeBlock;

                if(nos.SetByDerived)
                {
                    // this may be null
                    timedEmitBlock = timedEmitBlock.If($"{nos.InstanceName} != null");
                }
                timedEmitBlock.Line(nos.InstanceName + ".TimedEmit();");
            }
        }