예제 #1
0
 // The array here allows members to inherit defaults from their parent, but
 // override them if they were added later.
 // For example:
 // - <package api-since="21">
 //   - <class api-since="24">
 //     - <method api-since="28">
 // Elements need to be passed in the above order. (package, class, member)
 static void FillApiSince(ApiVersionsSupport.IApiAvailability model, params XElement[] elems)
 {
     foreach (var elem in elems)
     {
         if (int.TryParse(elem.XGetAttribute("api-since"), out var result))
         {
             model.ApiAvailableSince = result;
         }
     }
 }
예제 #2
0
 public static string AdditionalAttributeString(this ApiVersionsSupport.IApiAvailability a)
 {
     return(a.ApiAvailableSince == 0 ? null : ", ApiSince = " + a.ApiAvailableSince);
 }