Пример #1
0
 public static MayBeEmptyTempContext <List <T> > BorrowList <T>(out List <T> linkedlist)
 {
     if (!MayBeEmptyTempContext <List <T> > .IsInit())
     {
         MayBeEmptyTempContext <List <T> > .SetNewHandler(
             () => new List <T>(),
             list => list.Clear());
     }
     return(MayBeEmptyTempContext <List <T> > .Borrow(out linkedlist));
 }
Пример #2
0
 public static MayBeEmptyTempContext <LineBox> BorrowLineBox(out LineBox linebox)
 {
     if (!MayBeEmptyTempContext <LineBox> .IsInit())
     {
         MayBeEmptyTempContext <LineBox> .SetNewHandler(
             () => new LineBox(),
             line => line.Reset());
     }
     return(MayBeEmptyTempContext <LineBox> .Borrow(out linebox));
 }