Skip to content

Commit

Permalink
Issue #267 - solution refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamNaj committed Dec 29, 2014
1 parent 69621b8 commit 21cbf49
Show file tree
Hide file tree
Showing 136 changed files with 326 additions and 391 deletions.
248 changes: 124 additions & 124 deletions Cognifide.PowerShell.csproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
using System.Linq;
using System.Management.Automation;
using System.Web;
using Cognifide.PowerShell.Extensions;
using Cognifide.PowerShell.PowerShellIntegrations;
using Cognifide.PowerShell.PowerShellIntegrations.Host;
using Cognifide.PowerShell.PowerShellIntegrations.Provider;
using Cognifide.PowerShell.Utility;
using Sitecore.Configuration;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Globalization;
using Sitecore.Web.UI.Sheer;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets
namespace Cognifide.PowerShell.Commandlets
{
public class BaseCommand : PSCmdlet
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Management.Automation;
using Cognifide.PowerShell.Commandlets.Security;
using Cognifide.PowerShell.Extensions;
using Cognifide.PowerShell.Security;
using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets
namespace Cognifide.PowerShell.Commandlets
{
public abstract class BaseEditItemCommand : BaseGovernanceCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Management.Automation;
using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets
namespace Cognifide.PowerShell.Commandlets
{
public abstract class BaseItemCommand : BaseLanguageAgnosticItemCommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Management.Automation;
using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets
namespace Cognifide.PowerShell.Commandlets
{
public abstract class BaseItemRecursiveCommand : BaseItemCommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Data;
using System.Management.Automation;
using Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive;
using Cognifide.PowerShell.Commandlets.Interactive;
using Sitecore.Data;
using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets
namespace Cognifide.PowerShell.Commandlets
{
public abstract class BaseLanguageAgnosticItemCommand : BaseShellCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@
using System.Linq;
using System.Management.Automation;
using Sitecore.Configuration;
using Sitecore.Data;
using Sitecore.Data.Fields;
using Sitecore.Data.Items;
using Sitecore.Data.Managers;
using Sitecore.Globalization;
using Sitecore.Publishing;
using Sitecore.Publishing.Pipelines.PublishItem;
using Sitecore.Shell.Framework.Commands;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsCommon.Add, "ItemLanguage")]
[OutputType(new[] { typeof(Item) }, ParameterSetName = new[] { "Item from Pipeline", "Item from Path", "Item from ID" })]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System.Management.Automation;

using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet("ConvertFrom", "ItemClone")]
[OutputType(new[] { typeof(Item) }, ParameterSetName = new[] { "Item from Pipeline", "Item from Path", "Item from ID" })]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Sitecore.Configuration;
using Sitecore.Data;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
public abstract class DatabaseContextBaseCommand : BaseCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Sitecore.Data;
using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsData.Expand, "Token")]
[OutputType(new[] {typeof (Item)})]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Sitecore.Data;
using Sitecore.Data.Archiving;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsCommon.Get, "Archive")]
[OutputType(new[] {typeof (Archive)})]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Sitecore.Data;
using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsCommon.Get, "Database")]
[OutputType(new[] {typeof (Database)})]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Sitecore.Data;
using Sitecore.Data.Indexing;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
#pragma warning disable 612, 618
[Cmdlet(VerbsCommon.Get, "Index")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Management.Automation;
using Sitecore.Configuration;
using Sitecore.Data;
using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsCommon.Get, "ItemByUri")]
[OutputType(new[] {typeof (Item)})]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System.Linq;
using System.Management.Automation;

using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet("Get", "ItemClone")]
[OutputType(new[] { typeof(Item) }, ParameterSetName = new[] { "Item from Pipeline", "Item from Path", "Item from ID" })]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using Sitecore.Configuration;
using Sitecore.Data;
using Sitecore.Data.Fields;
using Sitecore.Data.Items;
using Sitecore.Data.Managers;
using Sitecore.Data.Templates;
using Sitecore.Globalization;
using Sitecore.Publishing;
using Sitecore.Publishing.Pipelines.PublishItem;
using Sitecore.Shell.Framework.Commands;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsCommon.Get, "ItemField")]
[OutputType(new[] {typeof (TemplateField), typeof (string), typeof (Field)},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Linq;
using System.Management.Automation;
using Sitecore.Configuration;
using Cognifide.PowerShell.Extensions;
using Cognifide.PowerShell.PowerShellIntegrations;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.Globalization;
using Sitecore.Links;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsCommon.Get, "ItemReference")]
[OutputType(new[] {typeof (Item)},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Linq;
using System.Management.Automation;
using Sitecore.Configuration;
using Cognifide.PowerShell.Extensions;
using Cognifide.PowerShell.PowerShellIntegrations;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.Globalization;
using Sitecore.Links;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsCommon.Get, "ItemReferrer")]
[OutputType(new[] {typeof (Item)},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System.Collections.Generic;
using System.Management.Automation;
using System.Web.UI;
using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsCommon.Get, "ItemTemplate")]
[OutputType(new[] {typeof (TemplateItem)})]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Sitecore.Configuration;
using Sitecore.Search;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsCommon.Get, "SearchIndex")]
[OutputType(new[] {typeof (Index)})]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System.Management.Automation;

using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet("New", "ItemClone")]
[OutputType(new[] { typeof(Item) }, ParameterSetName = new[] { "Item from Pipeline", "Item from Path", "Item from ID" })]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
using System.Linq;
using System.Management.Automation;
using Cognifide.PowerShell.Extensions;
using Cognifide.PowerShell.PowerShellIntegrations.Commandlets;
using Sitecore.Configuration;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.Publishing;
using Sitecore.Publishing.Pipelines.PublishItem;

namespace Cognifide.PowerShell.Management
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsData.Publish, "Item")]
[OutputType(new Type[] {}, ParameterSetName = new[] {"Item from Pipeline", "Item from Path", "Item from ID"})]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using Sitecore.Configuration;
using Sitecore.Data;
using Sitecore.Data.Fields;
using Sitecore.Data.Items;
using Sitecore.Data.Managers;
using Sitecore.Globalization;
using Sitecore.Publishing;
using Sitecore.Publishing.Pipelines.PublishItem;
using Sitecore.Shell.Framework.Commands;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet(VerbsCommon.Remove, "ItemLanguage")]
public class RemoveItemLanguageCommand : BaseItemCommand
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Management.Automation;
using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Data
namespace Cognifide.PowerShell.Commandlets.Data
{
[Cmdlet("Wrap", "Item")]
[OutputType(new[] {typeof (Item)})]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Globalization;
using System.Management.Automation;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive
namespace Cognifide.PowerShell.Commandlets.Interactive
{
public class BaseFormCommand : BaseShellCommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
using System.Collections.ObjectModel;
using System.Linq;
using System.Management.Automation;
using Cognifide.PowerShell.Extensions;
using Cognifide.PowerShell.PowerShellIntegrations;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive
namespace Cognifide.PowerShell.Commandlets.Interactive
{
public class BaseListViewCommand : BaseFormCommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive.Messages;
using Cognifide.PowerShell.Commandlets.Interactive.Messages;
using Sitecore;
using Sitecore.Configuration;
using Sitecore.Jobs.AsyncUI;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive
namespace Cognifide.PowerShell.Commandlets.Interactive
{
public class BaseShellCommand : BaseCommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Management.Automation;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive
namespace Cognifide.PowerShell.Commandlets.Interactive
{
[Cmdlet(VerbsCommon.Close, "Window")]
public class CloseWindowCommand : BaseShellCommand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
using System.Collections;
using System.IO;
using System.Management.Automation;
using Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive.Messages;
using Cognifide.PowerShell.Commandlets.Interactive.Messages;
using Sitecore.Data.Items;
using Sitecore.IO;
using Sitecore.Jobs.AsyncUI;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive
namespace Cognifide.PowerShell.Commandlets.Interactive
{
[Cmdlet("Download", "File")]
[OutputType(new[] {typeof (String)}, ParameterSetName = new[] {"Download Item", "Download File"})]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Management.Automation;
using Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive.Messages;
using Cognifide.PowerShell.Commandlets.Interactive.Messages;
using Sitecore;
using Sitecore.Data.Items;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive
namespace Cognifide.PowerShell.Commandlets.Interactive
{
[Cmdlet("Execute", "ShellCommand")]
[OutputType(new[] {typeof (Item)})]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Sitecore.Jobs.AsyncUI;
using Sitecore.Shell.Framework;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive.Messages
namespace Cognifide.PowerShell.Commandlets.Interactive.Messages
{
[Serializable]
public class CloseWindowMessage : BasePipelineMessage, IMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Sitecore.Text;
using Sitecore.Web.UI.Sheer;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive.Messages
namespace Cognifide.PowerShell.Commandlets.Interactive.Messages
{
[Serializable]
public class DownloadMessage : BasePipelineMessage, IMessage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Sitecore.Jobs.AsyncUI;

namespace Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Interactive.Messages
namespace Cognifide.PowerShell.Commandlets.Interactive.Messages
{
public interface IMessageWithResult
{
Expand Down
Loading

0 comments on commit 21cbf49

Please sign in to comment.