protected override T CreateInstance(Ninject.Activation.IContext context) { var resource = Scoping.getContextAttribute <ResourceAttribute>(context); if (resource == null) { throw new ArgumentException("Injected resources must have Resource attributes"); } return(loader.loadResource <T>(resource.Path)); }
public T CreateInstance(Ninject.Activation.IContext context) { XMLConfigValue value = Scoping.getContextAttribute <XMLConfigValue>(context); if (value == null) { return(default(T)); } return(manager.getValue <T>(value.file, value.xpath)); }