コード例 #1
0
 internal void Inicializar(Guid idPc,List<ArchivoSOA> archivos, IModeloSOA contrato)
 {
     archivoSOABindingSource.DataSource = archivos;
     _contrato = contrato;
     _idPc = idPc;
     if (archivos.Count == 0)
         button3.Enabled = false;
 }
コード例 #2
0
 internal void Inicializar(IModeloSOA presenterLocal, DockPanel dockMain, IPaletaHerramienta paleta)
 {
     _paleta = paleta;
     _server = presenterLocal;
     _dockMain = dockMain;
     _snifferMaster = new SimuladorCliente.Sniffers.VistaSnifferMaster(presenterLocal);
 }
コード例 #3
0
        private static void InicializarServicio(IModeloSOA singletonCalculator, string puerto, string direccionIP)
        {
            ServiceHost calculatorHost =
                new ServiceHost(singletonCalculator);

            NetTcpBinding binding =
                new NetTcpBinding(SecurityMode.None, true);
            binding.ReaderQuotas.MaxArrayLength = 2147483647;
            binding.MaxBufferSize = 2147483647;
            binding.MaxReceivedMessageSize = 2147483647;
            binding.ReaderQuotas.MaxBytesPerRead = 2147483647;
            binding.ReaderQuotas.MaxNameTableCharCount = 2147483647;
            binding.ReaderQuotas.MaxDepth = 2147483647;
            binding.ReaderQuotas.MaxStringContentLength = 2147483647;
            Uri address = new Uri(@"net.tcp://" + direccionIP + ":" + puerto + "/Simulador");
            binding.ReceiveTimeout = TimeSpan.MaxValue;
            binding.ReliableSession.InactivityTimeout = TimeSpan.MaxValue;


            calculatorHost.AddServiceEndpoint(
                typeof(IModeloSOA), binding, address);
            calculatorHost.Open();

            
        }