Skip to content

Commit ad3c420

Browse files
committed
Enforce file width standard
Ignia maintains a 128 character width standard for files. And, for the most part, that's honored. But a handful of areas—and especially comments, broke over the 128 character limit. In most case, this was likely due to refactoring or automated renames which made `<see/>` references longer. Regardless, the vast majority of these are fixed here. (There are a handful that were left as is due to Ignia not having a good multi-line standard for breaking up particular types of references; we'll want to establish a consistent way of handling those.)
1 parent 6d213a9 commit ad3c420

2 files changed

Lines changed: 28 additions & 8 deletions

File tree

Ignia.Topics.Web/TopicRepository.cs

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ public static class TopicRepository {
3939
/// <summary>
4040
/// Gets a list of available <see cref="ContentTypeDescriptor"/> objects from the Configuration.
4141
/// </summary>
42-
[Obsolete("The TopicRepository class is obsolete, as is the ContentTypes property. Instead, clients should use Dependency Injection with the ITopicRepository interface.", false)]
42+
[Obsolete(
43+
"The TopicRepository class is obsolete, as is the ContentTypes property. Instead, clients should use Dependency " +
44+
"Injection with the ITopicRepository interface.",
45+
false
46+
)]
4347
public static ContentTypeDescriptorCollection ContentTypes {
4448
get {
4549
if (_contentTypes != null) {
@@ -55,7 +59,11 @@ public static ContentTypeDescriptorCollection ContentTypes {
5559
/// <summary>
5660
/// Static reference to the root <see cref="Topic"/>.
5761
/// </summary>
58-
[Obsolete("The TopicRepository class is obsolete, as is the RootTopic property. Instead, clients should use Dependency Injection with the ITopicRepository interface.", false)]
62+
[Obsolete(
63+
"The TopicRepository class is obsolete, as is the RootTopic property. Instead, clients should use Dependency Injection " +
64+
"with the ITopicRepository interface.",
65+
false
66+
)]
5967
public static Topic RootTopic {
6068
get {
6169
if (_rootTopic == null) {
@@ -75,7 +83,11 @@ public static Topic RootTopic {
7583
/// <remarks>
7684
/// The web.config stores information such as data providers, views directory, etc.
7785
/// </remarks>
78-
[Obsolete("The TopicRepository class is obsolete, as is the Configuration property. Instead, clients should use Dependency Injection with the ITopicRepository interface.", false)]
86+
[Obsolete(
87+
"The TopicRepository class is obsolete, as is the Configuration property. Instead, clients should use Dependency " +
88+
"Injection with the ITopicRepository interface.",
89+
false
90+
)]
7991
public static TopicsSection Configuration {
8092
get {
8193
if (_configuration == null) {
@@ -98,11 +110,18 @@ public static TopicsSection Configuration {
98110
/// Pulled from the implementing website's configuration via the <see
99111
/// cref="Ignia.Topics.Configuration.TopicDataProviderManager"/>.
100112
/// </remarks>
101-
[Obsolete("The TopicRepository class is obsolete, as is the TopicProviders property. Instead, clients should use Dependency Injection with the ITopicRepository interface.", false)]
113+
[Obsolete(
114+
"The TopicRepository class is obsolete, as is the TopicProviders property. Instead, clients should use Dependency " +
115+
"Injection with the ITopicRepository interface.",
116+
false
117+
)]
102118
public static ITopicRepository DataProvider {
103119
get {
104120
if (_topicRepository == null) {
105-
throw new Exception("The TopicRepository has not been configured with an instance of ITopicProvider. Configure the application by setting the TopicRepository.DataProvider in e.g. the global.asax file.");
121+
throw new Exception(
122+
"The TopicRepository has not been configured with an instance of ITopicProvider. Configure the application by " +
123+
"setting the TopicRepository.DataProvider in e.g. the global.asax file."
124+
);
106125
}
107126
return _topicRepository;
108127
}

Ignia.Topics.Web/WebFormsTopicRoutingService.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ public string View {
200200
// Validate the content-type after the slash, then validate it against available views
201201
for (var i = 0; i < splitHeaders.Length; i++) {
202202
if (splitHeaders[i].IndexOf("/", StringComparison.InvariantCultureIgnoreCase) >= 0) {
203-
// Get content-type after the slash and replace '+' characters in the content-type to '-' for view file encoding purposes
203+
// Get content-type after the slash and replace '+' characters in the content-type to '-' for view file
204+
// purposes
204205
var acceptHeader = splitHeaders[i]
205206
.Substring(splitHeaders[i].IndexOf("/", StringComparison.InvariantCultureIgnoreCase) + 1)
206207
.Replace("+", "-");
@@ -214,9 +215,9 @@ public string View {
214215

215216
/*----------------------------------------------------------------------------------------------------------------------
216217
| Pull from topic attribute
217-
| Pull from Topic's View Attribute; additional check against the Topic's ContentType Topic View Attribute is not necessary
218-
| as it is set as the default View value for the Topic
219218
>-----------------------------------------------------------------------------------------------------------------------
219+
| Pull from Topic's View Attribute; additional check against the Topic's ContentType Topic View Attribute is not
220+
| necessary as it is set as the default View value for the Topic
220221
\---------------------------------------------------------------------------------------------------------------------*/
221222
if (viewName == null && !String.IsNullOrEmpty(topic.View)) {
222223
IsValidView(contentType, topic.View, out viewName);

0 commit comments

Comments
 (0)