Exemple #1
0
        public WebPageMetadata(ImperativeCodeModel imperativeCodeModel, IBackendApiRegistry apiRegistry, TypeMember pageClass)
        {
            _imperativeCodeModel = imperativeCodeModel;
            _apiRegistry         = apiRegistry;

            this.PageClass        = pageClass;
            this.StateClass       = pageClass.BaseType.GenericArguments[0];
            this.ControllerMethod = TryFindControllerMethod();
            this.ModelProperty    = FindModelProperty();
            this.Components       = DiscoverComponents();
            this.BackendApis      = DiscoverBackendApis();
            this.IsIndex          = pageClass.HasAttribute <WebUI.Semantic.IndexPageAttribute>();
        }