Ejemplo n.º 1
0
        private void TryToEstablishPipeConnection()
        {
            try
            {
                var connection = StorageServicePipeAccessPoint.GetConnection();

                serviceConnection = connection.CreateChannel();

                StorageServicePipeButton.IsEnabled = (connection.State != CommunicationState.Faulted && connection.State != CommunicationState.Closed);
                StorageServicePipeTextBlock.Text   = connection.State.ToString();
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
        }
 private void InitializeNetwork()
 {
     connection          = StorageServicePipeAccessPoint.GetConnection();
     connection.Faulted += OnConnectionFall;
     _serviceChannel     = null;
 }