[nem-en] External method that use System.Query's ExtensionAttribute

Kamil Skalski kamil.skalski at gmail.com
Sat May 13 16:31:41 CEST 2006


+
+        when (SystemType.SQ_ExtensionAttribute != null) {
+          def t = SystemType.SQ_ExtensionAttribute;
+          when (system_type.IsDefined (t, false)) {
+            foreach (m is IMethod in GetMembers ())
+              when (m.IsStatic && m.GetHandle ().IsDefined (t, false))
+                LibraryReferenceManager.AddExtensionMethod (m);
+          }
+        }

AFAIR my patch avoided this code duplication. Is it not possible to do now?

> P.S.: One more question, I've been doing some tests, and it seems that
> if I define a extension method for IEnumerable['a] it does not work for
> IEnumerable[string] :-(
>

Michał's today refactoring was exactly made to fix this. But I'm not
sure if it is already finished.

-- 
Kamil Skalski
http://nazgul.omega.pl


More information about the devel-en mailing list