Exemplo n.º 1
0
 public Response(Code C, IStreamableContent body)
 {
     httpCode      = C;
     this.httpBody = body;
     this.AddInstruction(new Instruction("Server", "Sabertooth"));
     this.AddInstruction(new Instruction("Date", DateTime.Now.ToString("R")));
 }
Exemplo n.º 2
0
        protected bool SaveFile(string urlpath, IStreamableContent isc)
        {
            string fullpath = Path.Combine(AssetSubdir, urlpath);

            if (File.Exists(fullpath))
            {
                return(false);
            }
            else
            {
                using (FileStream FS = File.Create(fullpath)) {
                    isc.StreamTo(FS);
                }
                return(true);
            }
        }
Exemplo n.º 3
0
 public ClientReturn(IStreamableContent body)
 {
     this.body = body;
 }
Exemplo n.º 4
0
 public void SetBody(IStreamableContent ICS)
 {
     this.httpBody = ICS;
 }
Exemplo n.º 5
0
 public void SetBody(byte[] B, MIME M)
 {
     this.httpBody = new GeneratedResource(B, M);
 }