protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"Type = {(Type == null ? "null" : Type.ToString())}");
     toStringOutput.Add($"Name = {(Name == null ? "null" : Name == string.Empty ? "" : Name)}");
     toStringOutput.Add($"Description = {(Description == null ? "null" : Description == string.Empty ? "" : Description)}");
     toStringOutput.Add($"SourceApplication = {(SourceApplication == null ? "null" : SourceApplication.ToString())}");
     toStringOutput.Add($"AllowedObjectTypes = {(AllowedObjectTypes == null ? "null" : $"[{ string.Join(", ", AllowedObjectTypes)} ]")}");
     toStringOutput.Add($"SellerVisibility = {(SellerVisibility == null ? "null" : SellerVisibility.ToString())}");
     toStringOutput.Add($"AppVisibility = {(AppVisibility == null ? "null" : AppVisibility.ToString())}");
     toStringOutput.Add($"StringConfig = {(StringConfig == null ? "null" : StringConfig.ToString())}");
     toStringOutput.Add($"NumberConfig = {(NumberConfig == null ? "null" : NumberConfig.ToString())}");
     toStringOutput.Add($"SelectionConfig = {(SelectionConfig == null ? "null" : SelectionConfig.ToString())}");
     toStringOutput.Add($"CustomAttributeUsageCount = {(CustomAttributeUsageCount == null ? "null" : CustomAttributeUsageCount.ToString())}");
     toStringOutput.Add($"Key = {(Key == null ? "null" : Key == string.Empty ? "" : Key)}");
 }
Esempio n. 2
0
        /// <summary>
        /// 得到备注的描述字符串(不包括前后的 (* *))。
        /// </summary>
        /// <returns>备注的描述字符串。</returns>
        public override string GetCommentDecl()
        {
            StringConfig config = new StringConfig(string.Empty);

            if (!string.IsNullOrEmpty(this.Comment))
            {
                config["_C"] = this.Comment;
            }

            if (!string.IsNullOrEmpty(this.UUID))
            {
                config["UUID"] = this.UUID;
            }

            return(config.ToString());
        }