Example #1
0
        static void ConfigureUser()
        {
            var person = PersonBuilder
                         .Person()
                         .WithFirstName("Max")
                         .WithLastName("Planc")
                         .WithPrimaryContact(new EmailAdress("*****@*****.**"))
                         .WithSecondaryContact(new EmailAdress("*****@*****.**"))
                         .AndNoMoreContacts()
                         .Build();

            // builder.SetPrimaryContact(email);
            Console.WriteLine(person);

            IUserFactory  factory = new PersonFactory();
            IUser         user    = factory.CreateUser("Max", "Planck");
            IUserIdentity id      = factory.CreateIdentity();

            user.SetIdentity(id);

            var factoryM = new MachineFactory(
                new System.Collections.Generic.Dictionary <string, Producer>
            {
                ["pc"] = new Producer()
            });
            var machine = factoryM.CreateUser("pc", "1000");
            var id2     = factoryM.CreateIdentity();

            machine.SetIdentity(id2);
        }
Example #2
0
        static void ConfigureUser()
        {
            IUserFactory factory = new PersonFactory();

            IUser user = factory.CreateUser("Jon", "Bulmer");

            IUserIdentiy id = factory.CreateIdentity();
        }
Example #3
0
        static void ConfigureUser()
        {
            IUserFactory factory = new PersonFactory();

            IUser user = factory.CreateUser("Max", "Planck");

            IUserIdentity id = factory.CreateIdentity();

            user.SetIdentity(id);
        }