2010-12-07 15:47:45 -08:00
|
|
|
|
using Orchard.Environment;
|
2010-07-28 14:01:29 -07:00
|
|
|
|
using Orchard.Environment.Extensions;
|
|
|
|
|
using Orchard.Environment.Extensions.Models;
|
2010-07-29 17:45:40 -07:00
|
|
|
|
using Orchard.Localization;
|
2010-07-28 14:01:29 -07:00
|
|
|
|
using Orchard.Packaging.Services;
|
|
|
|
|
|
|
|
|
|
namespace Orchard.Packaging {
|
2010-11-11 17:17:38 -08:00
|
|
|
|
[OrchardFeature("Gallery")]
|
2010-07-28 14:01:29 -07:00
|
|
|
|
public class DefaultPackagingUpdater : IFeatureEventHandler {
|
|
|
|
|
private readonly IPackagingSourceManager _packagingSourceManager;
|
|
|
|
|
|
2010-11-10 14:46:56 -08:00
|
|
|
|
public DefaultPackagingUpdater(IPackagingSourceManager packagingSourceManager) {
|
2010-07-28 14:01:29 -07:00
|
|
|
|
_packagingSourceManager = packagingSourceManager;
|
|
|
|
|
}
|
|
|
|
|
|
2010-07-29 17:45:40 -07:00
|
|
|
|
public Localizer T { get; set; }
|
|
|
|
|
|
2010-12-04 15:31:24 -08:00
|
|
|
|
public void Installing(Feature feature) {
|
2010-07-28 14:01:29 -07:00
|
|
|
|
}
|
|
|
|
|
|
2010-12-04 15:31:24 -08:00
|
|
|
|
public void Installed(Feature feature) {
|
|
|
|
|
if (feature.Descriptor.Id == "Gallery") {
|
2011-01-07 15:01:24 -08:00
|
|
|
|
_packagingSourceManager.AddSource("Orchard Extensions Gallery", "http://orchardproject.net/gallery09/server/FeedService.svc");
|
2010-12-04 15:31:24 -08:00
|
|
|
|
}
|
2010-07-28 14:01:29 -07:00
|
|
|
|
}
|
|
|
|
|
|
2010-12-04 15:31:24 -08:00
|
|
|
|
public void Enabling(Feature feature) {
|
2010-07-28 14:01:29 -07:00
|
|
|
|
}
|
|
|
|
|
|
2010-12-04 15:31:24 -08:00
|
|
|
|
public void Enabled(Feature feature) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Disabling(Feature feature) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Disabled(Feature feature) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Uninstalling(Feature feature) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Uninstalled(Feature feature) {
|
2010-07-28 14:01:29 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|