예제 #1
0
 public static bool HasDisposeRegistry(this IContext ctx, bool disposeTolerant = default)
 => DisposeRegistryProp.TryGetValue(ctx: ctx, value: out _, disposeTolerant: disposeTolerant);
예제 #2
0
 /// <summary>
 /// Indicates that a dependencies available for this context.
 /// </summary>
 /// <param name="ctx">
 /// Context.
 /// <para>Can't be <see langword="null"/>.</para>
 /// </param>
 /// <param name="disposeTolerant">
 /// Dispose tolerancy flag.
 /// <para><see langword="true"/> — context dispose state ignored and default value returned.</para>
 /// </param>
 /// <returns></returns>
 public static bool HasDependencies(this IContext ctx, bool disposeTolerant = default)
 => DependenciesProp.TryGetValue(ctx: ctx, value: out _, disposeTolerant: disposeTolerant);