Exemplo n.º 1
0
 public override void EnsureValidCodeBlock()
 {
     if (CodeBuilder.IsEmpty)
     {
         CodeBuilder.AddStatement(new ReturnStatement());
     }
 }
Exemplo n.º 2
0
 public virtual void EnsureValidCodeBlock()
 {
     if (ImplementedByRuntime == false && CodeBuilder.IsEmpty)
     {
         CodeBuilder.AddStatement(new ConstructorInvocationStatement(maintype.BaseType));
         CodeBuilder.AddStatement(new ReturnStatement());
     }
 }
Exemplo n.º 3
0
 public virtual void EnsureValidCodeBlock()
 {
     if (ImplementedByRuntime == false && CodeBuilder.IsEmpty)
     {
         CodeBuilder.AddStatement(new NopStatement());
         CodeBuilder.AddStatement(new ReturnStatement());
     }
 }
 public virtual void EnsureValidCodeBlock()
 {
     if (CodeBuilder.IsEmpty)
     {
         CodeBuilder.InvokeBaseConstructor();
         CodeBuilder.AddStatement(new ReturnStatement());
     }
 }
 public virtual void EnsureValidCodeBlock()
 {
     if (CodeBuilder.IsEmpty)
     {
         CodeBuilder.AddStatement(new NopStatement());
         CodeBuilder.AddStatement(new ReturnStatement());
     }
 }
Exemplo n.º 6
0
 public virtual void EnsureValidCodeBlock()
 {
     if (ImplementedByRuntime == false && CodeBuilder.IsEmpty)
     {
         if (ReturnType == typeof(void))
         {
             CodeBuilder.AddStatement(new ReturnStatement());
         }
         else
         {
             CodeBuilder.AddStatement(new ReturnStatement(new DefaultValueExpression(ReturnType)));
         }
     }
 }