private void Page_Load(object sender, System.EventArgs e) { try { if (!this.IsPostBack) { // Inizializzazione filtri this.InitializeFilters(); // Ripristino dati di filtro this.RestoreFilterItems(); // Inizializzazione controllo di validazione this.InitializeValidationControl(); // Registrazione della classe necessaria // per il rilascio delle risorse relative ai filtri fascicoli ResourceReleaser.Register(new TrasmissioniFilterResourceReleaser()); } } catch (Exception ex) { ErrorManager.redirect(this, ex); } }
private void Page_Load(object sender, System.EventArgs e) { try { if (!this.IsPostBack) { this.InitializeValidationControl(); // Inizializzazione dati maschera di ricerca this.InitializeFilters(); if (this.OnSelectCorrispondente()) { this.GetFascicoliFilterItem().CorrispondenteLocazioneFisica = this.GetCorrispondenteRubrica(); } // Ripristino elementi di filtro dalla sessione this.RestoreFilterItems(); // Registrazione della classe necessaria // per il rilascio delle risorse relative ai filtri fascicoli ResourceReleaser.Register(new FascicoliFilterResourceReleaser()); } } catch (Exception ex) { ErrorManager.redirect(this, ex); } }
public void TestMethod1() { var dirService = new DirectoryService(); var dir = dirService.CreateDhlWaybillFolder(new List<string> (){"张三","李四"}); ResourceReleaser resourceReleaser = new ResourceReleaser(); string fullPath = resourceReleaser.ReleaseCXTemplate(dir); }
public override void Start() { _bootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(newCachedThreadPool(daemon(this.GetType().Name + "-boss@" + _destination)), newCachedThreadPool(daemon(this.GetType().Name + "-worker@" + _destination)))); _bootstrap.PipelineFactory = this; _channelPool = new ResourcePoolAnonymousInnerClass(this, _maxUnusedChannels); /* * This is here to couple the channel releasing to Response.close() itself and not * to TransactionStream.close() as it is implemented here. The reason is that a Response * that is returned without a TransactionStream will still hold the channel and should * release it eventually. Also, logically, closing the channel is not dependent on the * TransactionStream. */ _resourcePoolReleaser = () => { if (_channelPool != null) { _channelPool.release(); } }; }
private void Page_Load(object sender, System.EventArgs e) { if (RicercaDocumentiHandler.CurrentFilter == null) { RicercaDocumentiHandler.CurrentFilter = new SearchProperties(); } this.GetControlFiltriDocumenti().Initialize(this.GetControlValidation()); this.GetControlFiltriAvanzati().Initialize(this.GetControlValidation()); if (!this.IsPostBack) { ResourceReleaser.Register(new DocumentiFilterResourceReleaser()); this.AdvancedFilterPanelVisible = this.Mask.AdvancedDocProperties || this.Mask.AdvancedProtProperties; this.InitializeValidationControl(); this.Fetch(); } }
public TransactionObligationResponse(T response, StoreId storeId, long obligationTxId, ResourceReleaser releaser) : base(response, storeId, releaser) { this._obligationTxId = obligationTxId; }
public TransactionStreamResponse(T response, StoreId storeId, TransactionStream transactions, ResourceReleaser releaser) : base(response, storeId, releaser) { this._transactions = transactions; }
public Response(T response, StoreId storeId, ResourceReleaser releaser) { this._storeId = storeId; this._response = response; this._releaser = releaser; }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public <PAYLOAD> Response<PAYLOAD> deserializeResponse(org.jboss.netty.handler.queue.BlockingReadHandler<org.jboss.netty.buffer.ChannelBuffer> reader, ByteBuffer input, long timeout, Deserializer<PAYLOAD> payloadDeserializer, ResourceReleaser channelReleaser, final org.neo4j.kernel.impl.transaction.log.entry.LogEntryReader<org.neo4j.kernel.impl.transaction.log.ReadableClosablePositionAwareChannel> entryReader) throws java.io.IOException //JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected: public virtual Response <PAYLOAD> DeserializeResponse <PAYLOAD>(BlockingReadHandler <ChannelBuffer> reader, ByteBuffer input, long timeout, Deserializer <PAYLOAD> payloadDeserializer, ResourceReleaser channelReleaser, LogEntryReader <ReadableClosablePositionAwareChannel> entryReader) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final DechunkingChannelBuffer dechunkingBuffer = new DechunkingChannelBuffer(reader, timeout, internalProtocolVersion, applicationProtocolVersion); DechunkingChannelBuffer dechunkingBuffer = new DechunkingChannelBuffer(reader, timeout, _internalProtocolVersion, _applicationProtocolVersion); PAYLOAD response = payloadDeserializer.Read(dechunkingBuffer, input); StoreId storeId = ReadStoreId(dechunkingBuffer, input); // Response type is what previously was a byte saying how many data sources there were in the // coming transaction stream response. For backwards compatibility we keep it as a byte and we introduce // the transaction obligation response type as -1 sbyte responseType = dechunkingBuffer.ReadByte(); if (responseType == TransactionObligationResponse.RESPONSE_TYPE) { // It is a transaction obligation response long obligationTxId = dechunkingBuffer.ReadLong(); return(new TransactionObligationResponse <PAYLOAD>(response, storeId, obligationTxId, channelReleaser)); } // It's a transaction stream in this response TransactionStream transactions = visitor => { NetworkReadableClosableChannel channel = new NetworkReadableClosableChannel(dechunkingBuffer); using (PhysicalTransactionCursor <ReadableClosablePositionAwareChannel> cursor = new PhysicalTransactionCursor <ReadableClosablePositionAwareChannel>(channel, entryReader)) { while (cursor.next() && !visitor.visit(cursor.get())) { } } }; return(new TransactionStreamResponse <PAYLOAD>(response, storeId, transactions, channelReleaser)); }