Beispiel #1
0
 public void SetBody(Statement statement)
 {
     if (statement == null)
     {
         throw new ArgumentNullException("statement");
     }
     this.statementMetadata = statement;
     if (!modifiers.AllowsMethodBody())
     {
         if (statementMetadata.GetType() != typeof(Compiler.Metadata.EmptyStatement))
         {
             throw new CompilerException(modifiers, Resource.BodyNotCompatibleWithModifier);
         }
     }
 }