Fix Default value (#19)
This commit is contained in:
@@ -27,6 +27,11 @@ namespace ProxyInterfaceConsumer
|
||||
|
||||
public IMyInterface MyInterface { get; set; }
|
||||
|
||||
public int DefaultValue(int x = 100)
|
||||
{
|
||||
return x + 1;
|
||||
}
|
||||
|
||||
public string Add(string s, string @string)
|
||||
{
|
||||
return s + @string;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json;
|
||||
using AutoMapper;
|
||||
using Microsoft.CodeAnalysis;
|
||||
|
||||
namespace ProxyInterfaceConsumer
|
||||
{
|
||||
@@ -33,6 +32,9 @@ namespace ProxyInterfaceConsumer
|
||||
|
||||
IPerson p = new PersonProxy(new Person());
|
||||
p.Name = "test";
|
||||
Console.WriteLine("DefaultValue " + p.DefaultValue());
|
||||
Console.WriteLine("DefaultValue " + p.DefaultValue(42));
|
||||
|
||||
var ap = new AddressProxy(new Address { HouseNumber = 42 });
|
||||
p.Address = ap;
|
||||
var add = p.AddAddress(ap);
|
||||
|
||||
Reference in New Issue
Block a user