/** <inheritDoc /> */ public ICache <TK1, TV1> WithKeepPortable <TK1, TV1>() { if (_flagKeepPortable) { var result = this as ICache <TK1, TV1>; if (result == null) { throw new InvalidOperationException( "Can't change type of portable cache. WithKeepPortable has been called on an instance of " + "portable cache with incompatible generic arguments."); } return(result); } return(new CacheImpl <TK1, TV1>(_ignite, UU.CacheWithKeepPortable(Target), Marshaller, _flagSkipStore, true, _flagAsync, _flagNoRetries)); }