Ejemplo n.º 1
0
        public Nfs3MountResult Mount(string dirPath)
        {
            MemoryStream  ms     = new MemoryStream();
            XdrDataWriter writer = StartCallMessage(ms, _client.Credentials, 1);

            writer.Write(dirPath);

            RpcReply reply = DoSend(ms);

            if (reply.Header.IsSuccess)
            {
                Nfs3Status status = (Nfs3Status)reply.BodyReader.ReadInt32();
                if (status == Nfs3Status.Ok)
                {
                    return(new Nfs3MountResult(reply.BodyReader));
                }

                throw new Nfs3Exception(status);
            }
            else
            {
                throw new RpcException(reply.Header.ReplyHeader);
            }
        }
Ejemplo n.º 2
0
 internal void Write(XdrDataWriter writer)
 {
     writer.WriteBuffer(Value);
 }
Ejemplo n.º 3
0
        ////public TimeSpan ToTimeSpan()
        ////{
        ////    return new TimeSpan(_seconds * TicksPerSec + (_nseconds / TicksPerNanoSec));
        ////}

        public void Write(XdrDataWriter writer)
        {
            writer.Write(_seconds);
            writer.Write(_nseconds);
        }
Ejemplo n.º 4
0
 public void Write(XdrDataWriter writer)
 {
     writer.Write((int)_flavour);
     writer.WriteBuffer(_body);
 }