コード例 #1
0
ファイル: SDType.cs プロジェクト: llenroc/sharpDox
        private string GetInheritText(bool linked)
        {
            var inheritedText = ImplementedInterfaces.Count > 0 ?
                                string.Join(", ", ImplementedInterfaces.Select(i => linked ? i.LinkedNameWithArguments :
                                                                               i.NameWithTypeArguments).ToList()) : string.Empty;

            var baseText = string.Empty;

            if (BaseTypes.Any())
            {
                baseText = linked ? BaseTypes.First().LinkedNameWithArguments : BaseTypes.First().NameWithTypeArguments;
            }

            if (inheritedText != string.Empty && baseText != string.Empty)
            {
                inheritedText += ", " + baseText;
                inheritedText  = " : " + inheritedText;
            }
            else if (inheritedText != string.Empty)
            {
                inheritedText = " : " + inheritedText;
            }
            else if (baseText != string.Empty)
            {
                inheritedText = " : " + baseText;
            }

            return(inheritedText);
        }