0
'InlineTagsContainerTagEditor'라는 커뮤니티 서버 SDK의 컨트롤에서 메서드를 재정의하려고합니다.구성하는 다른 클래스와 함께 namspace에있는 메서드를 재정의해야합니다.
이 컨트롤의 소스를 찾을 때 'TaggableContentTagEditableList'라는 다른 클래스가있는 파일 안에 있습니다. 난 그냥 특정 '태그'를 제거 TaggableContentEditableList의 버전을 만들려고하고
namespace CommunityServer.Controls
{
public class TaggableContentTagEditableList : WrappedContentBase, ICallbackEventHandler
{
protected virtual InlineTagsContainerTagEditor GetInlineTagEditor(ITagsContainer container)
{
return new InlineTagsContainerTagEditor(container);
}
}
public class InlineTagsContainerTagEditor : TWC.InlineEditor
{
ITagsContainer _container;
public InlineTagsContainerTagEditor(ITagsContainer container)
: base()
{
_container = container;
}
}
}
: 여기
내가 관련 부분이 생각하는 것입니다. 그 방법은 내가 아래에서 오버라이드하려고 시도했다. 그러나 나는 매우 길을 잃는다. 내 재정의 된 메서드를 사용하여 올바른 형식을 생성자가 찾도록 TaggableContentTagEditableList에 대한 생성자를 재정의해야합니까?public partial class TaggableContentEditableListExclude : TaggableContentTagEditableList
{
protected override InlineTagsContainerTagEditor GetInlineTagEditor(ITagsContainer container)
{
return new TagExcludeOption(container);
}
}
public partial class TagExcludeOption : InlineTagsContainerTagEditor
{
ITagsContainer _container;
public TagExcludeOption(ITagsContainer container) : base(container)
{
_container = container;
}
public override string FormatTags(string[] tagList)
{
// strip special tags
string[] newTagList = stripTags(tagList);
return base.FormatTags(newTagList);
}
private string[] stripTags(string[] tagList)
{
//doing something here
}
}
시도,하지만 당신은 당신의 문제를 해결 않았다 ... 허용 상태를 내 대답을 주었다 또는 당신은 여전히 하나를 haveing된다 위의 고정 코드? –