public void WithInterfaceInterfaceSucceeds()
 {
     _generatedClassBuilder.ImplementsInterface <ISimple>();
     _generatedClassBuilder.WithMethod("SimpleMethod")
     .WithReturnType(typeof(void))
     .WithInstruction(new NullaryInstruction(OpCodes.Ret))
     .CommitMethod()
     .CommitType();
     _generatedClassBuilder.Validate();
 }
Exemple #2
0
        public UsingGenerateMethodParameterBuilder()
        {
            var assemblyBuilder = new GeneratedAssemblyBuilder();
            var classBuilder    = new GeneratedClassBuilder(assemblyBuilder, "Name");
            var methodBuilder   = classBuilder.WithMethod("Method");

            _generatedMethodParameterBuilder = methodBuilder.WithParameter();
        }
 public UsingGenerateMethodBuilder()
 {
     _assemblyBuilder        = new GeneratedAssemblyBuilder();
     _classBuilder           = new GeneratedClassBuilder(_assemblyBuilder, "Name");
     _generatedMethodBuilder = _classBuilder.WithMethod("Method");
 }