Exemplo n.º 1
0
        // TODO: 记得修改。。。
        public async Task <IEnumerable <INetDiskUser> > GetAllNetDiskUsers()
        {
            if (!BoundAccount)
            {
                MessageBox.Show("尚未绑定百度账号,请使用工具绑定");
                throw new NullReferenceException("尚未绑定百度账号");
            }
            var user = new NetDiskUser(this);
            await user.UpdateUserInfoAsync();

            CurrentNetDiskUser = user;
            return(new[] { user });
        }
Exemplo n.º 2
0
 /// <summary>
 /// Intializes an instance of the <see cref="NetDiskFile"/> by specified an instance of the <see cref="INetDiskFile"/>,
 /// which will serve as the root file for the <see cref="INetDiskUser"/> instance.
 /// </summary>
 /// <param name="netDiskUser">The owner of the instance.</param>
 public NetDiskFile(NetDiskUser netDiskUser)
 {
     _netDiskUser = netDiskUser;
     _path        = "/";
 }