GetPrintDataStream() public method

public GetPrintDataStream ( CloudPrintJob job ) : Stream
job CloudPrintJob
return Stream
Example #1
0
        private void WriteJobData()
        {
            if (!File.Exists(this._PrintDataFileName))
            {
                using (Stream datastream = File.Create(this._PrintDataFileName))
                {
                    using (Stream inputstream = _Proxy.GetPrintDataStream(this))
                    {
                        inputstream.CopyTo(datastream);
                    }
                }
            }

#if DEBUG
            try  /* #@$%^& thing gives an IO exception, but doesn't say what happened.  #@&^%$ */
            {
                File.SetCreationTime(this._PrintDataFileName, this.CreateTime);
                File.SetLastWriteTime(this._PrintDataFileName, this.CreateTime);
            }
            catch
            {
            }

            Util.WindowsIdentityStore.SetFileAccess(this._PrintDataFileName, this.Username);
#endif
        }