Example #1
0
 /// <summary>
 /// Claims ownership on the given capability, preventing its automatic disposal.
 /// </summary>
 /// <typeparam name="T">Capability interface</typeparam>
 /// <param name="impl">Capability implementation</param>
 /// <returns>A disposable object. Calling Dispose() on the returned instance relinquishes ownership again.</returns>
 public static IDisposable Claim <T>(T impl) where T : class
 {
     return(new SkeletonRelinquisher(CapabilityReflection.CreateSkeletonInternal(impl)));
 }