Beispiel #1
0
        private void RegisterTypes()
        {
            foreach (var type in
                     from region in _map.Regions
                     from package in region.Packages
                     from declaredType in package.Assembly.GetTypes()
                     where declaredType.IsPublic &&
                     declaredType.IsClass &&
                     !declaredType.IsAbstract &&
                     !declaredType.IsAnonymous()
                     let isEvent = typeof(Event).IsAssignableFrom(declaredType)
                                   orderby isEvent descending
                                   select new { package, declaredType, isEvent })
            {
                _package      = type.package;
                _declaredType = type.declaredType;

                if (type.isEvent)
                {
                    RegisterEvent();
                }
                else if (TryRegisterArea() || TryRegisterWebApi())
                {
                    continue;
                }
                else
                {
                    if (!TryRegisterFlow())
                    {
                        TryRegisterDurable();
                    }
                }
            }

            _package      = null;
            _declaredType = null;
        }
Beispiel #2
0
 internal PackageBuild(RuntimePackage package, IFolder deploymentOutput)
 {
     _package = package;
     _output  = deploymentOutput.Then(FolderResource.From(package.Name));
 }