I'm developing an UWP app via C#, that uses IBasicVideoEffect with IDirect3DSurface. As mentioned in documentation, I have created Windows Runtime Component (Universal Windows) project.
But settings of effects are stored in some implementation of IPropertySet (smth like Dictionary<object, object>).
To use high - level operations on this storage, I've introduced IPropertySetExtensions
into runtime component, that has for example Get<T>
, GetOrDefault<T>
methods, which return instance of T
(not object
) from storage.
Than I realized, that same operations will be needed in main project, but when I changed
internal static class IPropertySetExtensions
into public
one, I got an error like "winmd components cant contain generic methods".
That's why I duplicated extension class into main project.
How can I avoid this duplicating? Maybe move shared code into NuGet .dll or smth?