public static void Add([NotNull] string typeName, [NotNull] MediaSkin skin) { Assert.ArgumentNotNull(typeName, nameof(typeName)); Assert.ArgumentNotNull(skin, nameof(skin)); Skins[typeName] = skin; }
public static void LoadType([NotNull] Type type, [NotNull] MediaSkinAttribute attribute) { Assert.ArgumentNotNull(type, nameof(type)); Assert.ArgumentNotNull(attribute, nameof(attribute)); var i = type.GetInterface(mediaSkinInterface); if (i == null) { return; } var mediaSkin = new MediaSkin { Type = type, Priority = attribute.Priority, SkinName = attribute.SkinName }; Add(attribute.SkinName, mediaSkin); }