コード例 #1
0
 public void Build(string template)
 {
     ConditionValidator.ThrowSystemExceptionIfNotValid <OperationCanceledException>(Types == null,
                                                                                    $"Should be run 'Load' method");
     ConditionValidator.ThrowExceptionIfNotValid <ArgumentNullException>((string.IsNullOrWhiteSpace(template)),
                                                                         nameof(template));
     _content = new List <IMdStringEditor>();
     foreach (var type in Types)
     {
         var mb = new MdFluentBuilder(template, type.Name, type);
         _content.Add(mb.Build());
     }
 }
コード例 #2
0
 public void Build()
 {
     ConditionValidator.ThrowSystemExceptionIfNotValid <OperationCanceledException>(Types == null,
                                                                                    $"Should be run 'Load' method");
     _content = new List <IMdStringEditor>();
     foreach (var type in Types)
     {
         var mb = new MdStringEditor(type.Name);
         MdStringBuilder.CreateHeader(mb, type);
         MdStringBuilder.BuildTable(mb, type, "Properties", type.Properties);
         MdStringBuilder.BuildTable(mb, type, "Fields", type.Fields);
         MdStringBuilder.BuildTable(mb, type, "Methods", type.Methods);
         _content.Add(mb);
     }
 }