Exemple #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")));
 }
Exemple #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);
            }
        }
Exemple #3
0
 public ClientReturn(IStreamableContent body)
 {
     this.body = body;
 }
Exemple #4
0
 public void SetBody(IStreamableContent ICS)
 {
     this.httpBody = ICS;
 }
Exemple #5
0
 public void SetBody(byte[] B, MIME M)
 {
     this.httpBody = new GeneratedResource(B, M);
 }