Esempio n. 1
0
 // TODO detect early instead of generating duplicate constructor
 //[DeriveConstructor]
 //class DuplicateConstructor {
 //    public string name { get; }
 //    public DuplicateConstructor(string name) { }
 //}
 public static void Tests()
 {
     var a1 = new NoParams();
     var a2 = new OnlyReadonlyProperties(name: "John property");
     Console.WriteLine(a2.name);
     var a3 = new OnlyReadonlyFields("John field");
     Console.WriteLine(a3.name);
     var a4 = new ReadOnlyAndNonReadOnlyFields(name: "John field");
 }
Esempio n. 2
0
        // TODO detect early instead of generating duplicate constructor
        //[DeriveConstructor]
        //class DuplicateConstructor {
        //    public string name { get; }

        //    public DuplicateConstructor(string name) { }
        //}


        public static void Tests()
        {
            var a1 = new NoParams();
            var a2 = new OnlyReadonlyProperties(name: "John property");

            Console.WriteLine(a2.name);
            var a3 = new OnlyReadonlyFields("John field");

            Console.WriteLine(a3.name);
            var a4 = new ReadOnlyAndNonReadOnlyFields(name: "John field");
        }
Esempio n. 3
0
 public Task <Pair <Failure, List <City> > > execiute(NoParams @params)
 {
     return(this.todoRepository.GetCities());
 }