16 lines
565 B
C#
16 lines
565 B
C#
namespace VideoDownloader.Mobile;
|
|
|
|
/// <summary>M1 공유 타겟(U1): 플랫폼(안드로이드 인텐트)이 전달한 공유 텍스트 큐.</summary>
|
|
public static class ShareTarget
|
|
{
|
|
private static string? _pending;
|
|
|
|
public static void Deliver(string? sharedText)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(sharedText)) return;
|
|
Volatile.Write(ref _pending, sharedText);
|
|
}
|
|
|
|
/// <summary>대기 중 공유 텍스트를 꺼낸다(없으면 null).</summary>
|
|
public static string? Consume() => Interlocked.Exchange(ref _pending, null);
|
|
}
|