Exemple #1
0
        static void Main(string[] args)
        {
            string yuml;

            //var foo = typeof(IRoundShape).GetInterfaces();
            //new ToYuml.Test.YumlGeneratorTests().Interface_Inheritance_Chaining();

            Console.WriteLine("Requesting ab...");
            YumlRequest.Request("[A]->[B]", true, "a_b.png");

            Console.WriteLine("Requesting abc...");
            YumlRequest.Request("[A]->[B],[A]^-[C]", false, "abc.png");

            // Oroborous
            Console.WriteLine("Requesting ToYuml...");
            var gen = new YumlGenerator()
                .AddTypesForAssembly(typeof(YumlRequest))
                .SearchNonPublicMembers(true)
                .UseInterfaceInheritance(true);

            yuml = gen.Yuml();
            YumlRequest.Request(yuml, true, "ToYuml.png");

            Console.WriteLine("Requesting ToYuml.Test...");
            gen = new YumlGenerator()
                .AddTypesForAssembly(typeof(Animal))
                .UseInterfaceInheritance(true)
                .SearchNonPublicMembers(true);

            yuml = gen.Yuml();
            YumlRequest.Request(yuml, true, "ToYuml.Test.png");

            Console.WriteLine("Done!");
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object" /> class.
        /// </summary>
        public Association(YumlGenerator generator, Type type1, Type type2, bool type2IsEnumerable)
        {
            this.generator = generator;

            Type1 = type1;
            Type2 = type2;
            if (type2IsEnumerable) {
                Multiplicity1 = 1;
                Multiplicity2 = int.MaxValue;
            }
            else {
                Multiplicity1 = 1;
                Multiplicity2 = 1;
            }
            NavigableTo2 = true;
            NavigableTo1 = false;
        }
Exemple #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object" /> class.
        /// </summary>
        public Association(YumlGenerator generator, Type type1, Type type2, bool type2IsEnumerable)
        {
            this.generator = generator;

            Type1 = type1;
            Type2 = type2;
            if (type2IsEnumerable)
            {
                Multiplicity1 = 1;
                Multiplicity2 = int.MaxValue;
            }
            else
            {
                Multiplicity1 = 1;
                Multiplicity2 = 1;
            }
            NavigableTo2 = true;
            NavigableTo1 = false;
        }