Пример #1
0
 public override void Run()
 {
     try
     {
         ReceivePack rp = this._enclosing._enclosing.CreateReceivePack(dst);
         rp.Receive(out_r, in_w, System.Console.OpenStandardError());
     }
     catch (IOException)
     {
     }
     catch (RuntimeException)
     {
     }
     finally
     {
         try
         {
             out_r.Close();
         }
         catch (IOException)
         {
         }
         try
         {
             in_w.Close();
         }
         catch (IOException)
         {
         }
         dst.Close();
     }
 }
            /// <exception cref="System.IO.IOException"></exception>
            /// <exception cref="NGit.Transport.Resolver.ServiceNotEnabledException"></exception>
            /// <exception cref="NGit.Transport.Resolver.ServiceNotAuthorizedException"></exception>
            internal override void Execute(DaemonClient dc, Repository db)
            {
                ReceivePack  rp   = this._enclosing.receivePackFactory.Create(dc, db);
                InputStream  @in  = dc.GetInputStream();
                OutputStream @out = dc.GetOutputStream();

                rp.Receive(@in, @out, null);
            }
Пример #3
0
 public override void Receive(Stream inputStream, Stream outputStream)
 {
     using (var repository = GetRepository())
     {
         var pack = new ReceivePack(repository);
         pack.SetBiDirectionalPipe(false);
         pack.Receive(inputStream, outputStream, outputStream);
     }
 }
 /// <exception cref="System.IO.IOException"></exception>
 private void Receive(ReceivePack rp, TemporaryBuffer.Heap inBuf, TemporaryBuffer.Heap
                      outBuf)
 {
     rp.Receive(new ByteArrayInputStream(inBuf.ToByteArray()), outBuf, null);
 }
		/// <exception cref="System.IO.IOException"></exception>
		private void Receive(ReceivePack rp, TemporaryBuffer.Heap inBuf, TemporaryBuffer.Heap
			 outBuf)
		{
			rp.Receive(new ByteArrayInputStream(inBuf.ToByteArray()), outBuf, null);
		}
Пример #6
0
			/// <exception cref="System.IO.IOException"></exception>
			internal override void Execute(DaemonClient dc, Repository db)
			{
				IPAddress peer = dc.GetRemoteAddress();
				string host = peer.ToString();
				if (host == null)
				{
					host = peer.GetHostAddress();
				}
				ReceivePack rp = new ReceivePack(db);
				InputStream @in = dc.GetInputStream();
				string name = "anonymous";
				string email = name + "@" + host;
				rp.SetRefLogIdent(new PersonIdent(name, email));
				rp.SetTimeout(this._enclosing.GetTimeout());
				rp.Receive(@in, dc.GetOutputStream(), null);
			}