@@ -97,7 +97,7 @@ public Topic(string key, string contentType, Topic parent, int id = -1) {
9797 /// The unique identifier for the <see cref="Topic"/>.
9898 /// </value>
9999 /// <exception cref="ArgumentException">
100- /// The value of this topic has already been set to " + _id + " ; it cannot be changed.
100+ /// The value of this topic has already been set to { _id} ; it cannot be changed.
101101 /// </exception>
102102 /// <requires description="The id is expected to be a positive value." exception="T:System.ArgumentException">
103103 /// value > 0
@@ -107,7 +107,7 @@ public int Id {
107107 set {
108108 Contract . Requires < ArgumentOutOfRangeException > ( value > 0 , "The id is expected to be a positive value." ) ;
109109 if ( _id > 0 && ! _id . Equals ( value ) ) {
110- throw new ArgumentException ( "The value of this topic has already been set to " + _id + " ; it cannot be changed.") ;
110+ throw new ArgumentException ( $ "The value of this topic has already been set to { _id } ; it cannot be changed.") ;
111111 }
112112 _id = value ;
113113 }
@@ -405,8 +405,8 @@ public DateTime LastModified {
405405 /// <param name="sibling">The <see cref="Topic" /> to move this <see cref="Topic" /> to the right of.</param>
406406 /// <exception cref="ArgumentOutOfRangeException">parent - A descendant cannot be its own parent.</exception>
407407 /// <exception cref="InvalidKeyException">
408- /// Duplicate key when setting Parent property: the topic with the name '" + Key + " ' already exists in the '" +
409- /// parent.Key + "' topic.
408+ /// Duplicate key when setting Parent property: the topic with the name '{ Key} ' already exists in the '{parent.Key}'
409+ /// topic.
410410 /// </exception>
411411 public void SetParent ( Topic parent , Topic sibling = null ) {
412412
@@ -428,9 +428,9 @@ public void SetParent(Topic parent, Topic sibling = null) {
428428 \-----------------------------------------------------------------------------------------------------------------------*/
429429 if ( parent != _parent && parent . Children . Contains ( Key ) ) {
430430 throw new InvalidKeyException (
431- "Duplicate key when setting Parent property: the topic with the name '" + Key +
432- "' already exists in the '" + parent . Key + "' topic."
433- ) ;
431+ $ "Duplicate key when setting Parent property: the topic with the name '{ Key } ' already exists in the ' { parent . Key } ' " +
432+ $ " topic."
433+ ) ;
434434 }
435435
436436 /*------------------------------------------------------------------------------------------------------------------------
@@ -478,7 +478,7 @@ public string GetUniqueKey() {
478478 var topic = this ;
479479
480480 for ( var i = 0 ; i < 100 ; i ++ ) {
481- if ( uniqueKey . Length > 0 ) uniqueKey = ":" + uniqueKey ;
481+ if ( uniqueKey . Length > 0 ) uniqueKey = $ ": { uniqueKey } " ;
482482 uniqueKey = topic . Key + uniqueKey ;
483483 topic = topic . Parent ;
484484 if ( topic == null ) break ;
@@ -507,7 +507,7 @@ public string GetWebPath() {
507507 Contract . Ensures ( Contract . Result < string > ( ) != null ) ;
508508 var uniqueKey = GetUniqueKey ( ) . Replace ( "Root:" , "/" ) . Replace ( ":" , "/" ) + "/" ;
509509 if ( ! uniqueKey . StartsWith ( "/" ) ) {
510- uniqueKey = "/" + uniqueKey ;
510+ uniqueKey = $ "/ { uniqueKey } " ;
511511 }
512512 return uniqueKey ;
513513 }
0 commit comments