public override Attribute CreateAttributeInstance <T>() { var attClass = typeof(T); if (attClass == typeof(ITermToBytesRefAttribute)) { return(new MyTermAttributeImpl()); } if (attClass.IsSubclassOf(typeof(CharTermAttribute))) { throw new System.ArgumentException("no"); } return(@delegate.CreateAttributeInstance <T>()); }
public override AttributeImpl CreateAttributeInstance(System.Type attClass) { return(attClass.IsAssignableFrom(typeof(TokenWrapper))?new TokenWrapper():delegate_Renamed.CreateAttributeInstance(attClass)); }