Beispiel #1
0
        internal static ChmodEventArgs Read(CustomLogReader areader)
        {
            ChmodEventArgs args = new ChmodEventArgs();

            using (ElementLogReader reader = new ElementLogReader(areader))
            {
                while (reader.Read(0))
                {
                    if (reader.GetEmptyElementValue("filename", out string value))
                    {
                        args.FileName = value;
                    }
                    else if (reader.GetEmptyElementValue("permissions", out value))
                    {
                        args.FilePermissions = FilePermissions.CreateReadOnlyFromText(value);
                    }
                    else if (SessionRemoteException.IsResult(reader))
                    {
                        args.Error = SessionRemoteException.ReadResult(reader);
                    }
                }
            }

            return(args);
        }
Beispiel #2
0
        internal static ChmodEventArgs Read(CustomLogReader areader)
        {
            ChmodEventArgs args = new ChmodEventArgs();

            using (ElementLogReader reader = new ElementLogReader(areader))
            {
                while (reader.Read(0))
                {
                    string value;
                    if (reader.GetEmptyElementValue("filename", out value))
                    {
                        args.FileName = value;
                    }
                    else if (reader.GetEmptyElementValue("permissions", out value))
                    {
                        args.FilePermissions = FilePermissions.CreateReadOnlyFromText(value);
                    }
                    else if (SessionRemoteException.IsResult(reader))
                    {
                        args.Error = SessionRemoteException.ReadResult(reader);
                    }
                }
            }

            return args;
        }