Esempio n. 1
0
 public Usable <bool> TryBegin(TimeSpan timeout) => Usable.Begin(() => TryEnter(timeout), ret => { if (ret)
                                                                                                   {
                                                                                                       Exit();
                                                                                                   }
                                                                 });
Esempio n. 2
0
 public Usable <bool> TryBegin() => Usable.Begin(() => TryEnter(), ret => { if (ret)
                                                                            {
                                                                                Exit();
                                                                            }
                                                 });
Esempio n. 3
0
 public Usable <bool> TryBegin(int millisecondsTimeout) => Usable.Begin(() => TryEnter(millisecondsTimeout), ret => { if (ret)
                                                                                                                      {
                                                                                                                          Exit();
                                                                                                                      }
                                                                        });
Esempio n. 4
0
 public Usable Begin() => Usable.Begin(() => Enter(), () => Exit());