|
namespace TestHarness
{
using System;
using System.Linq;
class Program
{
static void Main(string[] args)
{
AutoImplementatedPropertiesTest();
EventDelegateTest();
Console.ReadLine();
}
private static void EventDelegateTest()
{
Console.WriteLine("\n2)Event and Delegate += Test:");
AddRemoveHandlerOfEvent addRemoveHandlerOfEvent = new AddRemoveHandlerOfEvent();
LogIt logItObject = addRemoveHandlerOfEvent.InitialiseLogIt();
addRemoveHandlerOfEvent.GetInitialMethodPointer().ToList().ForEach(item => Console.WriteLine(item));
addRemoveHandlerOfEvent.GetInvocationListFrom(logItObject).ToList().ForEach(item => Console.WriteLine(item));
}
private static void AutoImplementatedPropertiesTest()
{
Console.WriteLine("1) AutoImplementatedProperties Test:");
AutoImplementatedProperties autoImplementatedProperties = new AutoImplementatedProperties();
Person person = autoImplementatedProperties.CreateATestObject();
Console.WriteLine("[] Explore all the members...\n");
autoImplementatedProperties.ExploreMembers(person).ToList<string>().ForEach(item => Console.WriteLine(item));
Console.WriteLine("[] Explore all the private fields...\n");
autoImplementatedProperties.ExplorePrivateFields(person).ToList<string>().ForEach(item => Console.WriteLine(item));
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.