S
shapper
Hello,
I have the folllowing:
RssActionResult a = new RssActionResult();
And I get the error:
Cannot create an instance of the abstract class or interface
'App.Mvc.RssActionResult'
RssActionResult is as follows:
public abstract class RssActionResult : ActionResult {
public SyndicationFeed Feed { get; set; }
public override void ExecuteResult(ControllerContext context) {
context.HttpContext.Response.ContentType = "application/rss
+xml";
Rss20FeedFormatter formatter = new Rss20FeedFormatter(Feed);
using (XmlWriter writer = XmlWriter.Create
(context.HttpContext.Response.Output)) {
formatter.WriteTo(writer);
}
}
} // RssActionResult
And ActionResult is:
public abstract class ActionResult {
protected ActionResult();
public abstract void ExecuteResult(ControllerContext context);
} // ActionResult
Does anyone knows why I am getting this error?
Thanks,
Miguel
I have the folllowing:
RssActionResult a = new RssActionResult();
And I get the error:
Cannot create an instance of the abstract class or interface
'App.Mvc.RssActionResult'
RssActionResult is as follows:
public abstract class RssActionResult : ActionResult {
public SyndicationFeed Feed { get; set; }
public override void ExecuteResult(ControllerContext context) {
context.HttpContext.Response.ContentType = "application/rss
+xml";
Rss20FeedFormatter formatter = new Rss20FeedFormatter(Feed);
using (XmlWriter writer = XmlWriter.Create
(context.HttpContext.Response.Output)) {
formatter.WriteTo(writer);
}
}
} // RssActionResult
And ActionResult is:
public abstract class ActionResult {
protected ActionResult();
public abstract void ExecuteResult(ControllerContext context);
} // ActionResult
Does anyone knows why I am getting this error?
Thanks,
Miguel