/// <summary> /// Generates and build prototype with resources informations within. /// </summary> public void Generate() { _dataLayer = new DataLayerManager(_configProvider, _prototype); Type data = Utils.LoadTypes(AppDomain.CurrentDomain.BaseDirectory) .Where(y => !y.IsAbstract && y.GetInterfaces().Contains(typeof(IBuilder))) .FirstOrDefault(type => ((IBuilder)Activator.CreateInstance(type)).IsPlatformSupported(_dataLayer.Platform)); if (data == null) { throw new ArgumentException("Data cannot be prepared."); } _dataLayerBuilder = (IBuilder)Activator.CreateInstance(data); _prototypeGenerator.Generate(_dataLayer.GetGenerable(), _configProvider); _dataLayerBuilder.Build(_configProvider, _dataLayer); var supportedStorages = _entityGenerator.Setup(_prototype, _dataLayer, _configProvider); _entityGenerator.Generate(); _dataLayer.Dispose(); CleanOutput(); GenerateApplications(); BuildApplications(); }