Error while implementing interfaces
hello,
i trying develop plugin indexing pdf files using seekafile server 1.5 beta2, open-source indexing server written purely in .net.
the class name pdfplugin(in namespace pdfplugin). class inherits interface named idocumentplugin( part of seekafile.plugin namespace). class file follows:
using system;
using system.io;
using system.windows.forms;
using lucene.net.analysis;
using lucene.net.documents;
using org.pdfbox.pdmodel;
using org.pdfbox.util;
using seekafile.plugin;
namespace pdfplugin
{
public class pdfplugin : seekafile.plugin.idocumentplugin
{
public pdfplugin()
{
}
public string getbody(string path)
{
pddocument pdfdoc = new pddocument();
pdfdoc = pddocument.load(path);
pdftextstripper stripper = new pdftextstripper();
return stripper.gettext(pdfdoc);
}
#region idocumentplugin members
public analyzer analyzer(string path)
{
return null;
}
public string description
{
{ return "parses pdf files."; }
}
public document document(string path)
{
document doc = new document();
return doc;
}
public string[] extensions
{
{ return new string[] { ".pdf" }; }
}
#endregion
}
}
the signatures of methods same of interface
however, following compilation errors:
error 1 'pdfplugin.pdfplugin' not implement interface member 'seekafile.plugin.idocumentplugin.document(string)'. 'pdfplugin.pdfplugin.document(string)' either static, not public, or has wrong return type.
error 2 'pdfplugin.pdfplugin' not implement interface member 'seekafile.plugin.idocumentplugin.analyzer(string)'. 'pdfplugin.pdfplugin.analyzer(string)' either static, not public, or has wrong return type.
thank you
since methods public , non-static, guess return type wrong. haven't redefined document , analyzer types in own code, have you?
Archived Forums V > Visual C# Language
Comments
Post a Comment