Skip to main content

ref-struct-delegates

Replace Func<> and Action<> with custom delegate types when any parameter or return type is a ref struct (Span<T>, ReadOnlySpan<T>, etc.). Ref structs cannot appear as generic type arguments, so Func<ReadOnlySpan<byte>, bool> is a compile error. The fix is a named delegate. USE FOR: writing public APIs that accept callbacks involving spans, storing span-accepting lambdas in fields, wrapping IJsonPathFunction or similar interfaces with delegate-based factories. DO NOT USE FOR: APIs where all parameters are regular (non-ref-struct) types — plain Func<>/Action<> is fine there.

الانتقال إلى التثبيت

معلومات المصدر

المستودع
corvus-dotnet/Corvus.JsonSchema
آخر نشاط في المصدر
١٢ مايو ٢٠٢٦ في ١٦:٤٣
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
١٩٨
التفرعات
٢٤

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.