• Lexical
Show / Hide Table of Contents
  • Lexical.FileSystem
    • Introduction
    • Abstractions
      • IFileSystem
        • IFileSystem
        • IFileSystemBrowse
        • IFileSystemCreateDirectory
        • IFileSystemDelete
        • IFileSystemFileAttribute
        • IFileSystemMount
        • IFileSystemMove
        • IFileSystemObserve
        • IFileSystemOpen
      • IEvent
      • IEntry
      • IOption
      • IToken
    • FileSystem
    • VirtualFileSystem
    • MemoryFileSystem
    • EmbeddedFileSystem
    • HttpFileSystem
    • Decoration
    • IFileProvider
    • Utility
      • DisposeList
      • FileScanner
      • VisitTree
      • File Operation
  • Lexical.FileProvider
    • Introduction
    • Package
    • Package.Abstractions
    • Root
    • Zip
    • Dll
    • SharpCompress
    • SharpZipLib
    • FileScanner
    • Utils
  • Lexical.Localization
    • Introduction
    • Tutorial
    • Asset
      • IAsset
      • IStringAsset
    • Line
      • ILine
      • ILineFactory
      • ILineRoot
      • ILineFormat
      • ILineLogger
      • LineComparer
    • File
      • ILineReader
      • ILineWriter
      • Ini
      • Json
      • Xml
      • Resx
      • Resources
    • Miscellaneous
      • Plurality
      • ICulturePolicy
      • IStringFormat
      • Dependency Injection
    • Practices
      • Class Library
      • Class Library DI
      • Class Library DI opt.
  • Lexical.Utilities
    • Introduction
    • UnicodeString
    • FileScanner
    • Permutation
    • Tuples
    • StructList

Resources File

.resources is a binary file.

// Read .ini file lines
ILineFormat pattern = new LinePattern("{Type.}[Key]{.Key_n}", lineFactory: LineAppender.Default);
IEnumerable<ILine> lines = ResourcesLineReader.Default.ReadLines("localization.resources", pattern);

// Read .ini file as string-key lines
IEnumerable<KeyValuePair<string, IString>> stringlines = 
    ResourcesLineReader.Default.ReadUnformedLines("localization.resources");

// Read .ini as tree
ILineTree tree = ResourcesLineReader.Default.ReadLineTree("localization.resources", pattern);

// Read IAsset
IAsset asset = ResourcesLineReader.Default.FileAsset("localization.resources", pattern);
Back to top Copyright © 2015-2020 Toni Kalajainen