Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Com essa alteração é possível criar um namespace mais complexo ex ( m #1

Closed
wants to merge 1 commit into from

1 participant

@abdalla

Com essa alteração é possível criar um namespace mais complexo ex ( msdev.Routes )

@abdalla abdalla closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 7, 2011
  1. @abdalla
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 0 deletions.
  1. +10 −0 JSRouteController.cs
View
10 JSRouteController.cs
@@ -53,6 +53,16 @@ namespace = {
}
*/
+ var _nameSpaces = routesPropertyName.Split('.');
+ string _nameSpaceParsed = string.Empty;
+ foreach (string currentName in _nameSpaces)
+ {
+ _nameSpaceParsed = _nameSpaceParsed + currentName + '.';
+ string _nameSpaceToAppend = _nameSpaceParsed.Substring(0, _nameSpaceParsed.Length - 1);
+ script.AppendFormat("{0} = {1};", _nameSpaceToAppend, "{}");
+
+ }
+
script.AppendFormat("{0} = {{{1}}};",
routesPropertyName,
allActions.Aggregate(String.Empty, (controllers, group) =>
Something went wrong with that request. Please try again.