示例#1
0
文件: TextWriter.cs 项目: Spaxys/Kean
        public async Tasks.Task <bool> Close()
        {
            bool result;

            if (result = this.backend.NotNull() && await this.Flush() && await this.backend.Close())
            {
                this.backend = null;
            }
            return(result);
        }
示例#2
0
文件: TextWriter.cs 项目: Spaxys/Kean
 protected TextWriter(ICharacterOutDevice backend)
 {
     this.backend = backend;
 }
示例#3
0
文件: TextWriter.cs 项目: Spaxys/Kean
 public static ITextWriter Open(ICharacterOutDevice backend)
 {
     return(backend.NotNull() ? new TextWriter(backend) : null);
 }