Example #1
0
        public static int CodeLine()
        {
            var readString = CreateIO.ObjReadString();

            return(CreateIO.Directory(@"‪C:\CosyNest").SonAll.OfType <IFile>().
                   Where(x => x.NameExtension is "cs" or "html" or "cshtml" or "razor").
                   Sum(x => readString(x.GetBitPipe()).CountAsync().Result()));
        }
Example #2
0
        /// <summary>
        /// 将文件读取到内存,并返回读取到的图片
        /// </summary>
        /// <param name="Path">图片所在的文件</param>
        /// <returns></returns>
        public static async Task <IImage> ImageMemory(PathText Path)
        {
            var stream = CreateIO.File(Path).GetBitPipe();

            return(ImageMemory(await stream.Read().FirstAsync(), ToolPath.SplitPathFile(Path).Extended));
        }
Example #3
0
 public void Add(IDirectView <IData> Data, bool Binding)
 => CreateIO.File(Path, false).Atomic(x =>
Example #4
0
 public Stream ToStream()
 => CreateIO.StreamEnumerable(Bytes);
Example #5
0
 public IFileType Merge(IEnumerable <string> fileType, string description = "")
 => CreateIO.FileType(description, ExtensionName.Union(fileType).ToArray());