@@ -41,9 +41,9 @@ namespace Ignia.Topics {
4141 /// </remarks>
4242 public class WebFormsTopicRoutingService : ITopicRoutingService {
4343
44- /*============================================================================================================================
44+ /*==========================================================================================================================
4545 | PRIVATE VARIABLES
46- \--------------------------------------------------------------------------------------------------------------------------- */
46+ \-------------------------------------------------------------------------------------------------------------------------*/
4747 private readonly ITopicRepository _topicRepository = null ;
4848 private readonly RouteData _routes = null ;
4949 private readonly Uri _uri = null ;
@@ -162,38 +162,38 @@ public Topic GetCurrentTopic() {
162162 public string View {
163163 get {
164164
165- /*------------------------------------------------------------------------------------------------------------------------
165+ /*----------------------------------------------------------------------------------------------------------------------
166166 | Return view, if found
167- \----------------------------------------------------------------------------------------------------------------------- */
167+ \---------------------------------------------------------------------------------------------------------------------*/
168168 if ( _view != null ) return _view ;
169169
170- /*------------------------------------------------------------------------------------------------------------------------
170+ /*----------------------------------------------------------------------------------------------------------------------
171171 | Set variables
172- \----------------------------------------------------------------------------------------------------------------------- */
172+ \---------------------------------------------------------------------------------------------------------------------*/
173173 var topic = GetCurrentTopic ( ) ;
174174 var contentType = topic . ContentType ;
175175
176- /*------------------------------------------------------------------------------------------------------------------------
176+ /*----------------------------------------------------------------------------------------------------------------------
177177 | Derive expected view
178- >-------------------------------------------------------------------------------------------------------------------------
178+ >-----------------------------------------------------------------------------------------------------------------------
179179 | Check expected page view type and validate against available View (page) templates, based on the following fallback
180180 | structure: user source (QueryString), Accept header, the Topic's View Attribute (with the default set as the Topic's
181181 | ContentType Topic View Attribute), and finally to the Content Type name.
182- \----------------------------------------------------------------------------------------------------------------------- */
182+ \---------------------------------------------------------------------------------------------------------------------*/
183183 string viewName = null ;
184184
185185 // Pull from QueryString
186186 if ( viewName == null && QueryParameters [ "View" ] != null ) {
187187 IsValidView ( contentType , QueryParameters [ "View" ] . ToString ( CultureInfo . InvariantCulture ) , out viewName ) ;
188188 }
189189
190- /*------------------------------------------------------------------------------------------------------------------------
190+ /*----------------------------------------------------------------------------------------------------------------------
191191 | Pull Headers
192- >-------------------------------------------------------------------------------------------------------------------------
192+ >-----------------------------------------------------------------------------------------------------------------------
193193 | ### TODO JJC071617: This introduces an unwanted dependency on HttpContext. While this is possible, it may introduce
194194 | incompatibilities with the context (e.g., do ASP.NET MVC and ASP.NET Web Forms expose the same HttpContext objects?
195195 | Preferably, this would be handled by each environment as appropriate, but that might muddle the logic.
196- \----------------------------------------------------------------------------------------------------------------------- */
196+ \---------------------------------------------------------------------------------------------------------------------*/
197197 if ( viewName == null && _headers [ "Accept" ] != null ) {
198198 var acceptHeaders = _headers [ "Accept" ] . ToString ( CultureInfo . InvariantCulture ) ;
199199 var splitHeaders = acceptHeaders . Split ( new char [ ] { ',' , ';' } ) ;
@@ -212,26 +212,26 @@ public string View {
212212 }
213213 }
214214
215- /*------------------------------------------------------------------------------------------------------------------------
215+ /*----------------------------------------------------------------------------------------------------------------------
216216 | Pull from topic attribute
217- >-------------------------------------------------------------------------------------------------------------------------
218217 | Pull from Topic's View Attribute; additional check against the Topic's ContentType Topic View Attribute is not necessary
219218 | as it is set as the default View value for the Topic
220- \-----------------------------------------------------------------------------------------------------------------------*/
219+ >-----------------------------------------------------------------------------------------------------------------------
220+ \---------------------------------------------------------------------------------------------------------------------*/
221221 if ( viewName == null && ! String . IsNullOrEmpty ( topic . View ) ) {
222222 IsValidView ( contentType , topic . View , out viewName ) ;
223223 }
224224
225- /*------------------------------------------------------------------------------------------------------------------------
225+ /*----------------------------------------------------------------------------------------------------------------------
226226 | Default to content type
227- \----------------------------------------------------------------------------------------------------------------------- */
227+ \---------------------------------------------------------------------------------------------------------------------*/
228228 if ( viewName == null ) {
229229 IsValidView ( contentType , contentType , out viewName ) ;
230230 }
231231
232- /*------------------------------------------------------------------------------------------------------------------------
232+ /*----------------------------------------------------------------------------------------------------------------------
233233 | Set view, and return
234- \----------------------------------------------------------------------------------------------------------------------- */
234+ \---------------------------------------------------------------------------------------------------------------------*/
235235 _view = viewName ;
236236 return _view ;
237237
@@ -321,15 +321,15 @@ private List<string> Views {
321321 /// </requires>
322322 public bool IsValidView ( string contentType , string viewName , out string matchedView ) {
323323
324- /*-------------------------------------------------------------------------------------------------------------------------
324+ /*------------------------------------------------------------------------------------------------------------------------
325325 | Validate parameters
326- \------------------------------------------------------------------------------------------------------------------------ */
326+ \-----------------------------------------------------------------------------------------------------------------------*/
327327 Contract . Requires ( contentType , "contentType" ) ;
328328 TopicFactory . ValidateKey ( contentType ) ;
329329
330- /*-------------------------------------------------------------------------------------------------------------------------
330+ /*------------------------------------------------------------------------------------------------------------------------
331331 | Check for content type specific view
332- \------------------------------------------------------------------------------------------------------------------------ */
332+ \-----------------------------------------------------------------------------------------------------------------------*/
333333 if (
334334 ! String . IsNullOrEmpty ( viewName ) &&
335335 Views . Contains ( contentType + "/" + viewName , StringComparer . InvariantCultureIgnoreCase )
0 commit comments