Beispiel #1
0
        public static Window CreateWindow(ref WindowType windowType)
        {
            if (windowType == null && Factory.HasContract(typeof(Window)))
            {
                windowType = new WindowType {
                    IsFactoryType = true
                }
            }
            ;

            if (windowType == null)
            {
                windowType = new WindowType {
                    Type = Assemblies.ExportedTypes.FirstOrDefault(x => x.IsSubclassOf(typeof(Window)))
                }
            }
            ;

            if (windowType == null)
            {
                windowType = new WindowType {
                    Type = typeof(Window)
                }
            }
            ;

            return(windowType.CreateWindow());
        }
    }
}
Beispiel #2
0
        public static Window CreateWindow(ref WindowType windowType)
        {
            if (windowType == null && Factory.HasContract(typeof(Window)))
            {
                windowType = new WindowType {
                    IsFactoryType = true
                }
            }
            ;

            if (windowType == null)
            {
                windowType = new WindowType {
                    Type = typeof(Window)
                }
            }
            ;

            return(windowType.CreateWindow());
        }
    }
}