Simple impl to MockRailsEngineContext.Url
[castle.git] / Tools / DynamicProxy / Castle.DynamicProxy / Builder / CodeBuilder / EasyRuntimeMethod.cs
blob3c355f87090acf7f6ccff67f485e7fa8e81716cf
1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.DynamicProxy.Builder.CodeBuilder
17 using System;
18 using System.Reflection;
20 using Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST;
21 using Castle.DynamicProxy.Builder.CodeBuilder.Utils;
23 /// <summary>
24 /// Summary description for EasyRuntimeMethod.
25 /// </summary>
26 [CLSCompliant(false)]
27 public class EasyRuntimeMethod : EasyMethod
29 public EasyRuntimeMethod(AbstractEasyType maintype, string name,
30 ReturnReferenceExpression returnRef, ArgumentReference[] arguments)
32 MethodAttributes atts = MethodAttributes.HideBySig|MethodAttributes.Public|MethodAttributes.Virtual;
33 Type[] args = ArgumentsUtil.InitializeAndConvert( arguments );
35 _builder = maintype.TypeBuilder.DefineMethod(
36 name, atts, returnRef.Type, args);
37 _builder.SetImplementationFlags(
38 MethodImplAttributes.Runtime|MethodImplAttributes.Managed);
41 public override void Generate()
46 public override void EnsureValidCodeBlock()