コード例 #1
0
ファイル: Constructor.cs プロジェクト: bartwe/plukc
 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);
         }
     }
 }