CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ISymbolExtensions.cs
Go to the documentation of this file.
1using Microsoft.CodeAnalysis;
2using System.Collections.Generic;
3
5{
6 internal static class ISymbolExtensions
7 {
8 internal static string GetFullNamespace(this ISymbol @this)
9 {
10 var namespaces = new List<string>();
11 var @namespace = @this.ContainingNamespace;
12
13 while (@namespace != null)
14 {
15 if (!string.IsNullOrWhiteSpace(@namespace.Name))
16 {
17 namespaces.Add(@namespace.Name);
18 }
19
20 @namespace = @namespace.ContainingNamespace;
21 }
22
23 namespaces.Reverse();
24
25 return string.Join(".", namespaces);
26 }
27 }
28}