Pienteger.QuranLib 6.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package Pienteger.QuranLib --version 6.0.4                
NuGet\Install-Package Pienteger.QuranLib -Version 6.0.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Pienteger.QuranLib" Version="6.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pienteger.QuranLib --version 6.0.4                
#r "nuget: Pienteger.QuranLib, 6.0.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Pienteger.QuranLib as a Cake Addin
#addin nuget:?package=Pienteger.QuranLib&version=6.0.4

// Install Pienteger.QuranLib as a Cake Tool
#tool nuget:?package=Pienteger.QuranLib&version=6.0.4                

Nuget Nuget

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:

  1. ScriptType.Clean - The script is a clean script that does not contain any Harkat or Tashkeel.
  2. 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 to ScriptType.Clean)
  • autoLoad - If true, the library will automatically load the chapters. (Default is set to false)
  • start and end - The start and end chapter numbers. (Default is set to 1 and 114. If autoLoad is true, 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. | | GetBismillah() | Returns Bismillahir Rahmanir Rahim in selected script | | GetInTheNameOfAllah() | Returns Bismillahir Rahmanir Rahim in selected script | | 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.