// Start is called before the first frame update
    void Start()
    {
        Print p = new PrintBanner("Hello");

        p.PrintWeak();
        p.PrintStrong();
    }
Example #2
0
    public static void Main(string[] args)
    {
        Print p = new PrintBanner("Hello");

        p.PrintWeak();
        p.PrintStrong();
    }
Example #3
0
        public static void AdapterMain()
        {
            IPrint p = new PrintBanner("Hello");

            p.PrintWeak();
            p.PrintStrong();
        }
Example #4
0
        public void ClassAdapterTest()
        {
            Print <string> p      = new PrintBanner("Hello");
            string         weak   = p.PrintWeak();
            string         strong = p.PrintStrong();

            Debug.WriteLine(weak);
            Debug.WriteLine(strong);

            Print <string> printGreeting  = new PrintGreeting("山田太郎");
            string         weakGreeting   = printGreeting.PrintWeak();
            string         strongGreeting = printGreeting.PrintStrong();

            Debug.WriteLine(weakGreeting);
            Debug.WriteLine(strongGreeting);
        }