protected override void Supply(
            IRenderContext renderContext,
            IDataContext dataContext,
            IDataDependency dependency)
        {
            SiteMap.Project         project    = null;
            SiteMap.Document        document   = null;
            SiteMap.Repository      repository = null;
            SiteMap.RepositoryOwner owner      = null;

            if (dependency != null && dependency.DataType == typeof(SiteMap.Project))
            {
                project = GetProject(renderContext);
                if (project != null)
                {
                    document   = project.Document;
                    repository = project.Repository;
                    if (repository != null)
                    {
                        owner = repository.Owner;
                    }
                }
            }

            dataContext.Set(project);
            dataContext.Set(document);
            dataContext.Set(repository);
            dataContext.Set(owner);
        }
        protected override void Supply(
            IRenderContext renderContext,
            IDataContext dataContext,
            IDataDependency dependency)
        {
            SiteMap.Document document = null;

            if (dependency != null && dependency.DataType == typeof(SiteMap.Document))
            {
                var functionalArea = dataContext.Get <SiteMap.FunctionalArea>();
                if (functionalArea != null)
                {
                    document = functionalArea.Document;
                }
            }

            dataContext.Set(document);
        }
Exemple #3
0
        protected override void Supply(
            IRenderContext renderContext,
            IDataContext dataContext,
            IDataDependency dependency)
        {
            SiteMap.Document document = null;

            if (dependency != null && dependency.DataType == typeof(SiteMap.Document))
            {
                var interfaceDefinition = dataContext.Get <SiteMap.InterfaceDefinition>();
                if (interfaceDefinition != null)
                {
                    document = interfaceDefinition.Document;
                }
            }

            dataContext.Set(document);
        }
Exemple #4
0
        protected override void Supply(
            IRenderContext renderContext,
            IDataContext dataContext,
            IDataDependency dependency)
        {
            SiteMap.Document document = null;

            if (dependency != null && dependency.DataType == typeof(SiteMap.Document))
            {
                var project = dataContext.Get <SiteMap.Project>();
                if (project != null)
                {
                    document = project.Document;
                }
            }

            dataContext.Set(document);
        }