Пример #1
0
 public CommentViewModel(SourceComment sourceComment)
 {
     Brief      = string.IsNullOrWhiteSpace(sourceComment?.Brief) ? null : sourceComment.Brief;
     Full       = string.IsNullOrWhiteSpace(sourceComment?.Full) ? null : sourceComment.Full;
     Remarks    = string.IsNullOrWhiteSpace(sourceComment?.Remarks) ? null : sourceComment.Remarks;
     Examples   = string.IsNullOrWhiteSpace(sourceComment?.Examples) ? null : sourceComment.Examples;
     Ux         = string.IsNullOrWhiteSpace(sourceComment?.Ux) ? null : sourceComment.Ux;
     Attributes = ParseAttributes(sourceComment);
 }
Пример #2
0
        public BasicCommentViewModel ToBasicComment()
        {
            // Don't include "See Also" in these comments as it can cause circular references
            var attrs = new CommentAttributesViewModel(Attributes.Advanced,
                                                       Attributes.ScriptModule,
                                                       Attributes.ScriptMethod,
                                                       Attributes.ScriptProperty,
                                                       Attributes.ScriptEvent,
                                                       Attributes.Returns,
                                                       Attributes.Published,
                                                       Attributes.Parameters,
                                                       null, // seeAlso
                                                       Attributes.Topic,
                                                       Attributes.Experimental,
                                                       Attributes.Deprecated);

            return(new BasicCommentViewModel(Brief, Full, attrs));
        }
Пример #3
0
 public MinimalCommentViewModel(SourceComment sourceComment)
 {
     Brief      = string.IsNullOrWhiteSpace(sourceComment?.Brief) ? null : sourceComment.Brief;
     Full       = string.IsNullOrWhiteSpace(sourceComment?.Full) ? null : sourceComment.Full;
     Attributes = ParseAttributes(sourceComment);
 }
Пример #4
0
 internal BasicCommentViewModel(string brief, string full, CommentAttributesViewModel attributes)
 {
     Brief      = brief;
     Full       = full;
     Attributes = attributes;
 }