Esempio n. 1
0
        public static READDIR3Response Deserialize(XDR xdr)
        {
            int status = xdr.ReadInt();

            xdr.ReadBoolean();
            Nfs3FileAttributes postOpDirAttr = Nfs3FileAttributes.Deserialize(xdr);
            long cookieVerf = 0;
            AList <READDIR3Response.Entry3> entries = new AList <READDIR3Response.Entry3>();

            READDIR3Response.DirList3 dirList = null;
            if (status == Nfs3Status.Nfs3Ok)
            {
                cookieVerf = xdr.ReadHyper();
                while (xdr.ReadBoolean())
                {
                    READDIR3Response.Entry3 e = READDIR3Response.Entry3.Deserialzie(xdr);
                    entries.AddItem(e);
                }
                bool eof = xdr.ReadBoolean();
                READDIR3Response.Entry3[] allEntries = new READDIR3Response.Entry3[entries.Count]
                ;
                Collections.ToArray(entries, allEntries);
                dirList = new READDIR3Response.DirList3(allEntries, eof);
            }
            return(new READDIR3Response(status, postOpDirAttr, cookieVerf, dirList));
        }
Esempio n. 2
0
 public READDIR3Response(int status, Nfs3FileAttributes postOpAttr, long cookieVerf
                         , READDIR3Response.DirList3 dirList)
     : base(status)
 {
     this.postOpDirAttr = postOpAttr;
     this.cookieVerf    = cookieVerf;
     this.dirList       = dirList;
 }