Pienteger.QuranLib
6.0.3
See the version list below for details.
dotnet add package Pienteger.QuranLib --version 6.0.3
NuGet\Install-Package Pienteger.QuranLib -Version 6.0.3
<PackageReference Include="Pienteger.QuranLib" Version="6.0.3" />
paket add Pienteger.QuranLib --version 6.0.3
#r "nuget: Pienteger.QuranLib, 6.0.3"
// Install Pienteger.QuranLib as a Cake Addin #addin nuget:?package=Pienteger.QuranLib&version=6.0.3 // Install Pienteger.QuranLib as a Cake Tool #tool nuget:?package=Pienteger.QuranLib&version=6.0.3
Quran Lib
A portable Quran library that gives read-only access to the entire Holy Quran.
Available Versions
- .NET 6
- .NET Framework 4.5
Installation
Install-Package Pienteger.QuranLib
Usage
using Pienteger.QuranLib;
QuranInstance quran = new QuranInstance();
quran.LoadChapters(1, 5);
Chapter? chapter = quran.GetChapter(1);
string randomAyah = chapter.Verses.ToList()[random.Next(0, chapter.TotalVerse)].Text;
API Documentation
Script Type
Two script types are available:
ScriptType.Clean
- The script is a clean script that does not contain any Harkat or Tashkeel.ScriptType.WithTashkil
- The script is a script that contains Harkat and Tashkeel.
ScriptType.Clean
is set to default. If you want to use ScriptType.WithTashkil
, you can set it in the constructor.
Constructor Parameters
QuranInstance
constructor has four parameters:
scriptType
- The script type. (Default is set toScriptType.Clean
)autoLoad
- Iftrue
, the library will automatically load the chapters. (Default is set tofalse
)start
andend
- The start and end chapter numbers. (Default is set to1
and114
. IfautoLoad
istrue
, the library will load chapters within this range.)
You can load chapters manually by calling LoadChapters
method. Without loading chapters, the library will not be able to work properly. If the chapter is not loaded, the library will load it automatically when you call GetChapter
method.
Methods
Method | Description |
---|---|
LoadChapters(byte start = 1, byte end = 114) |
Loads chapters within the specified range. |
GetChapterNames(byte start = 1, byte end = 114) |
Returns a list of chapter names. |
GetChapter(ChapterName chapterName) |
Returns a Chapter object. |
GetChapter(byte chapterNumber) |
Returns a Chapter object. |
GetChapters(ChapterName[] chapterNames) |
Returns a ImmutableList<Chapter> object. |
GetChapters(byte[] chapterNumbers) |
Returns a ImmutableList<Chapter> object. |
GetChapters() |
Returns a ImmutableList<Chapter> object. |
GetVerse(byte chapter, ushort verseNumber) |
Returns a Verse object. |
GetVerse(ChapterName chapter, ushort verseNumber) |
Returns a Verse object. |
GetVerses(ChapterName chapter) |
Returns a ImmutableList<Verse> object. |
GetVerses(ushort chapterNumber) |
Returns a ImmutableList<Verse> object. |
GetVerses(byte chapter, ushort startVerse, ushort endVerse) |
Returns a ImmutableList<Verse> object. |
GetVerses(ChapterName chapter, ushort startVerse, ushort endVerse) |
Returns a ImmutableList<Verse> object. |
All the text, and properties are read-only.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Replaced the text with tanzil.net's script because it contains stop marks for better readability.