/// <summary>
 /// Initializes a new instance of the <see cref="DocumentedProperty" /> class.
 /// </summary>
 /// <param name="info">The property info.</param>
 /// <param name="summary">The summary comment.</param>
 /// <param name="remarks">The remarks comment.</param>
 /// <param name="example">The example comment.</param>
 /// <param name="value">The value comment.</param>
 public DocumentedProperty(
     IPropertyInfo info,
     SummaryComment summary,
     RemarksComment remarks,
     ExampleComment example,
     ValueComment value)
     : base(MemberClassification.Property, summary, remarks, example)
 {
     _definition = info.Definition;
     _identity = info.Identity;
     _value = value;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DocumentedProperty" /> class.
 /// </summary>
 /// <param name="info">The property info.</param>
 /// <param name="summary">The summary comment.</param>
 /// <param name="remarks">The remarks comment.</param>
 /// <param name="example">The example comment.</param>
 /// <param name="value">The value comment.</param>
 public DocumentedProperty(
     IPropertyInfo info,
     SummaryComment summary,
     RemarksComment remarks,
     ExampleComment example,
     ValueComment value)
     : base(MemberClassification.Property, summary, remarks, example)
 {
     _definition = info.Definition;
     _identity   = info.Identity;
     _value      = value;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DocumentedProperty" /> class.
 /// </summary>
 /// <param name="info">The property info.</param>
 /// <param name="summary">The summary comment.</param>
 /// <param name="remarks">The remarks comment.</param>
 /// <param name="examples">The example comments.</param>
 /// <param name="value">The value comment.</param>
 /// <param name="metadata">The associated metadata.</param>
 public DocumentedProperty(
     IPropertyInfo info,
     SummaryComment summary,
     RemarksComment remarks,
     IEnumerable <ExampleComment> examples,
     ValueComment value,
     IDocumentationMetadata metadata)
     : base(MemberClassification.Property, summary, remarks, examples, metadata)
 {
     Definition = info.Definition;
     Identity   = info.Identity;
     Value      = value;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DocumentedProperty" /> class.
 /// </summary>
 /// <param name="info">The property info.</param>
 /// <param name="summary">The summary comment.</param>
 /// <param name="remarks">The remarks comment.</param>
 /// <param name="examples">The example comments.</param>
 /// <param name="value">The value comment.</param>
 /// <param name="metadata">The associated metadata.</param>
 public DocumentedProperty(
     IPropertyInfo info,
     SummaryComment summary,
     RemarksComment remarks,
     IEnumerable<ExampleComment> examples,
     ValueComment value,
     IDocumentationMetadata metadata)
     : base(MemberClassification.Property, summary, remarks, examples, metadata)
 {
     Definition = info.Definition;
     Identity = info.Identity;
     Value = value;
 }
        private static DocumentedProperty MapProperty(IPropertyInfo property, XmlDocumentationModel xmlModel)
        {
            SummaryComment summary = null;
            RemarksComment remarks = null;
            ExampleComment example = null;
            ValueComment   value   = null;

            // Get the documentation for the type.
            var member = xmlModel.Find(property.Identity);

            if (member != null)
            {
                // Get the comments for the type.
                summary = member.Comments.OfType <SummaryComment>().SingleOrDefault();
                remarks = member.Comments.OfType <RemarksComment>().SingleOrDefault();
                example = member.Comments.OfType <ExampleComment>().SingleOrDefault();
                value   = member.Comments.OfType <ValueComment>().SingleOrDefault();
            }

            return(new DocumentedProperty(property, summary, remarks, example, value));
        }
 public override void VisitValue(ValueComment comment, StringBuilder context)
 {
     context.Append("<value>");
     base.VisitValue(comment, context);
     context.Append("</value>");
 }
Exemple #7
0
 /// <summary>
 /// Visits a <c>value</c> comment.
 /// </summary>
 /// <param name="comment">The comment.</param>
 /// <param name="context">The context.</param>
 public virtual void VisitValue(ValueComment comment, TContext context)
 {
     VisitChildren(comment, context);
 }