Changeset 3903 for trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary
- Timestamp:
- 06/08/10 16:26:35 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs
r3743 r3903 21 21 22 22 using System; 23 using System.Linq; 23 24 using System.Text; 24 25 using System.Text.RegularExpressions; … … 157 158 foreach (var property in AssemblyAttribues) 158 159 sb.Append(", ").Append(property.Key).Append('=').Append(property.Value); 160 } 161 return sb.ToString(); 162 } 163 164 public string GetTypeNameInCode(HashSet<string> omitNamespaces) { 165 StringBuilder sb = new StringBuilder(); 166 if (!string.IsNullOrEmpty(Namespace) && omitNamespaces == null || !omitNamespaces.Contains(Namespace)) 167 sb.Append(Namespace).Append('.'); 168 sb.Append(ClassName); 169 if (IsGeneric) { 170 sb.Append("<"); 171 sb.Append( 172 string.Join(", ", 173 GenericArgs 174 .Select(a => a.GetTypeNameInCode(omitNamespaces)) 175 .ToArray())); 176 sb.Append(">"); 159 177 } 160 178 return sb.ToString();
Note: See TracChangeset
for help on using the changeset viewer.