Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FeatureCategoryNode"/> class.
        /// </summary>
        /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
        /// <param name="categoryName">The name of the feature category.</param>
        /// <param name="features">The objects which represent the Orchard features to encapsulate.</param>
        public FeatureCategoryNode(IPowerShellVfs vfs, string categoryName, OrchardFeature[] features)
            : base(vfs, categoryName)
        {
            this.features = features;

            this.Item = new CollectionItem(this)
            {
                Name        = categoryName,
                Description = "Contains all features of the " + categoryName + " category."
            };
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ThemesNode"/> class.
        /// </summary>
        /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
        /// <param name="modulesAgent">The modules agent instance.</param>
        public ThemesNode(IPowerShellVfs vfs, IModulesAgent modulesAgent)
            : base(vfs, "Themes") 
        {
            this.modulesAgent = modulesAgent;

            this.Item = new CollectionItem(this) 
            {
                Name = "Themes",
                Description = "Contains all themes available in the current tenant."
            };
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TenantsNode"/> class.
        /// </summary>
        /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
        /// <param name="tenantAgent">The tenant agent instance.</param>
        public TenantsNode(IPowerShellVfs vfs, ITenantAgent tenantAgent)
            : base(vfs, "Tenants")
        {
            this.tenantAgent = tenantAgent;

            this.Item = new CollectionItem(this)
            {
                Name        = "Tenants",
                Description = "Contains all tenants of the Orchard instance."
            };
        }
Example #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CommandsNode"/> class.
        /// </summary>
        /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
        /// <param name="commandAgent">The command agent instance.</param>
        public CommandsNode(IPowerShellVfs vfs, ICommandAgent commandAgent)
            : base(vfs, "Commands") 
        {
            this.commandAgent = commandAgent;

            this.Item = new CollectionItem(this) 
            {
                Name = "Commands",
                Description = "Contains all legacy Orchard commands available in the current tenant."
            };
        }
Example #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TenantsNode"/> class.
        /// </summary>
        /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
        /// <param name="tenantAgent">The tenant agent instance.</param>
        public TenantsNode(IPowerShellVfs vfs, ITenantAgent tenantAgent) 
            : base(vfs, "Tenants") 
        {
            this.tenantAgent = tenantAgent;

            this.Item = new CollectionItem(this) 
            {
                Name = "Tenants",
                Description = "Contains all tenants of the Orchard instance."
            };
        }
Example #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ThemesNode"/> class.
        /// </summary>
        /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
        /// <param name="modulesAgent">The modules agent instance.</param>
        public ThemesNode(IPowerShellVfs vfs, IModulesAgent modulesAgent)
            : base(vfs, "Themes")
        {
            this.modulesAgent = modulesAgent;

            this.Item = new CollectionItem(this)
            {
                Name        = "Themes",
                Description = "Contains all themes available in the current tenant."
            };
        }
Example #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FeatureCategoryNode"/> class.
        /// </summary>
        /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
        /// <param name="categoryName">The name of the feature category.</param>
        /// <param name="features">The objects which represent the Orchard features to encapsulate.</param>
        public FeatureCategoryNode(IPowerShellVfs vfs, string categoryName, OrchardFeature[] features)
            : base(vfs, categoryName)
        {
            this.features = features;

            this.Item = new CollectionItem(this) 
            {
                Name = categoryName,
                Description = "Contains all features of the " + categoryName + " category."
            };
        }
Example #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CommandsNode"/> class.
        /// </summary>
        /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
        /// <param name="commandAgent">The command agent instance.</param>
        public CommandsNode(IPowerShellVfs vfs, ICommandAgent commandAgent)
            : base(vfs, "Commands")
        {
            this.commandAgent = commandAgent;

            this.Item = new CollectionItem(this)
            {
                Name        = "Commands",
                Description = "Contains all legacy Orchard commands available in the current tenant."
            };
        }
Example #9
0
 public ThemeNode(IPowerShellVfs vfs, OrchardTheme theme)
     : base(vfs, theme.Name, theme)
 {
 }
Example #10
0
 public ThemeNode(IPowerShellVfs vfs, OrchardTheme theme)
     : base(vfs, theme.Name, theme)
 {
 }
Example #11
0
 public FeatureNode(IPowerShellVfs vfs, OrchardFeature feature)
     : base(vfs, feature.Name, feature)
 {
 }
Example #12
0
 /// <summary>
 /// Gets the subnodes of the node.
 /// </summary>
 /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
 /// <param name="module">The object which represents the Orchard module.</param>
 /// <returns>A sequence of VFS nodes.</returns>
 private static IEnumerable <VfsNode> GetSubNodes(IPowerShellVfs vfs, OrchardModule module)
 {
     return(module.Features.Select(f => new FeatureNode(vfs, f)));
 }
Example #13
0
 /// <summary>
 /// Gets the subnodes of the node.
 /// </summary>
 /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
 /// <param name="module">The object which represents the Orchard module.</param>
 /// <returns>A sequence of VFS nodes.</returns>
 private static IEnumerable<VfsNode> GetSubNodes(IPowerShellVfs vfs, OrchardModule module)
 {
     return module.Features.Select(f => new FeatureNode(vfs, f));
 }
Example #14
0
 public ModuleNode(IPowerShellVfs vfs, OrchardModule module)
     : base(vfs, module.Name, GetSubNodes(vfs, module))
 {
     this.Item = module;
 }
Example #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConfigurationNode"/> class.
 /// </summary>
 /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
 public ConfigurationNode(IPowerShellVfs vfs)
     : base(vfs, "Configuration")
 {
     this.Item = "Configuration";
 }
Example #16
0
 public TenantNode(IPowerShellVfs vfs, OrchardTenant tenant) 
     : base(vfs, tenant.Name) 
 {
     this.Item = tenant;
 }
Example #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConfigurationNode"/> class.
 /// </summary>
 /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param>
 public ConfigurationNode(IPowerShellVfs vfs)
     : base(vfs, "Configuration") 
 {
     this.Item = "Configuration";
 }
Example #18
0
 public TenantNode(IPowerShellVfs vfs, OrchardTenant tenant)
     : base(vfs, tenant.Name)
 {
     this.Item = tenant;
 }
Example #19
0
 public ModuleNode(IPowerShellVfs vfs, OrchardModule module)
     : base(vfs, module.Name, GetSubNodes(vfs, module))
 {
     this.Item = module;
 }
Example #20
0
 public CommandNode(IPowerShellVfs vfs, OrchardCommand command) 
     : base(vfs, command.CommandName, command)
 {
 }
Example #21
0
 public CommandNode(IPowerShellVfs vfs, OrchardCommand command)
     : base(vfs, command.CommandName, command)
 {
 }