Refactoring

--HG--
branch : dev
This commit is contained in:
Suha Can
2010-12-07 18:10:29 -08:00
parent 8267921c2f
commit c793c322bd
9 changed files with 22 additions and 30 deletions

View File

@@ -358,7 +358,7 @@ namespace Orchard.CodeGeneration.Commands {
}
}
private string CreateProjectItemGroup(string relativeFromPath, HashSet<string> content, HashSet<string> folders) {
private static string CreateProjectItemGroup(string relativeFromPath, HashSet<string> content, HashSet<string> folders) {
var contentInclude = "";
if (relativeFromPath != null && !relativeFromPath.EndsWith("\\", StringComparison.OrdinalIgnoreCase)) {
relativeFromPath += "\\";

View File

@@ -132,10 +132,7 @@ namespace Orchard.Experimental {
public void AddTime(long time) { _time += time; }
public override string ToString() {
if (_component == null)
return "root";
return _component.ToString();
return _component == null ? "root" : _component.ToString();
}
@@ -232,7 +229,7 @@ namespace Orchard.Experimental {
}
private class TotalVisitor {
public Node _totals = new Node(null);
public readonly Node _totals = new Node(null);
public void Visit(Node source) {
foreach (var child in source._children) {
@@ -272,7 +269,7 @@ namespace Orchard.Experimental {
return target;
}
private XElement Write(Node node) {
private static XElement Write(Node node) {
var elt = new XElement(
"Component",
new XAttribute("services", node._component != null ? string.Join(",", node._component.Services) : "root"),