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); }
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)); }
public MinimalCommentViewModel(SourceComment sourceComment) { Brief = string.IsNullOrWhiteSpace(sourceComment?.Brief) ? null : sourceComment.Brief; Full = string.IsNullOrWhiteSpace(sourceComment?.Full) ? null : sourceComment.Full; Attributes = ParseAttributes(sourceComment); }
internal BasicCommentViewModel(string brief, string full, CommentAttributesViewModel attributes) { Brief = brief; Full = full; Attributes = attributes; }