public void DerivedToString()
 {
     ToStringFormatState.ToggleToDefault();
     Console.WriteLine("ToString1[ \n" + new Derived().ToString() + "]");
     ToStringFormatState.ToggleToSpaces();
     Console.WriteLine("ToString2[ \n" +
                       ToStringFormatState.DefaultFormat.FormatBuffer(new Derived().ToString()) + "]");
 }
 public void BaseToString()
 {
     ToStringFormatState.ToggleToDefault();
     Console.WriteLine("ToString Before[" + new Base().ToString() + "]");
     ToStringFormatState.ToggleToSpaces();
     Console.WriteLine("ToString[ \n" +
                       ToStringFormatState.DefaultFormat.FormatBuffer(new Base().ToString()) + "]");
 }
        public void DynamicLoadClass()
        {
            MyLoader loader = new MyLoader();

            loader.Load();
            BaseClass impl = loader.Instantiate <BaseClass>(
                new Identifier("ExternalAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
                               "Devspace.HowToCodeDotNet01.LoadingAssembliesWithoutHassles.Implementation2"));

            // Show what assemblies are loaded
            ToStringFormatState.ToggleToSpaces();
            Console.WriteLine(ToStringFormatState.DefaultFormat.FormatBuffer(loader.ToString()));
            impl.Method();
        }
        public void DynamicLoadInterface()
        {
            AssemblyLoader loader = new AssemblyLoader("Test");

            loader.AssignRemoteAppDirectory(References.PluginPath);
            loader.Load();
            IInterface impl = loader.Instantiate <IInterface>(
                new Identifier("ExternalAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
                               "Devspace.HowToCodeDotNet01.LoadingAssembliesWithoutHassles.Implementation"));

            // Show what assemblies are loaded
            ToStringFormatState.ToggleToSpaces();
            Console.WriteLine(ToStringFormatState.DefaultFormat.FormatBuffer(loader.ToString()));
            impl.Method();
        }