iQuantile.DotLib.SessionManager 1.0.0

dotnet add package iQuantile.DotLib.SessionManager --version 1.0.0
NuGet\Install-Package iQuantile.DotLib.SessionManager -Version 1.0.0
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="iQuantile.DotLib.SessionManager" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add iQuantile.DotLib.SessionManager --version 1.0.0
#r "nuget: iQuantile.DotLib.SessionManager, 1.0.0"
#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 iQuantile.DotLib.SessionManager as a Cake Addin
#addin nuget:?package=iQuantile.DotLib.SessionManager&version=1.0.0

// Install iQuantile.DotLib.SessionManager as a Cake Tool
#tool nuget:?package=iQuantile.DotLib.SessionManager&version=1.0.0

Sharp Session

Just in case someone needs session for Windows forms/WPF

Installation

It is recommended to use NuGet. F.ex through the VS Package Manager Console Install-Package iQuantile.DotLib.SessionManager -Version 1.0.0r or using the VS "Manage NuGet Packages..." extension.

How to use

Session is a static class. add reference.

using static SessionManager.SharpSession;
Start Session
SessionStart();
Session["A"] = 5;
int y = (int)Session["A"];

Special Methods

GET<T>

In stead of type casting use GET<T>("key"). this will work like (T)Session["key"]

Session["A"] = 5;

int x = Get<int>("A");

SET

In stead of type casting use SET("Key",value).this will store the data on Session[key]

Set("A", 10);
int y =  (int)Session["A"];

OTHER SESSION METHODS


SessionDestroy(); //destroys the session
SessionUnset();  //re initialize session
SessionReset(); //Sets all keys to null
            

RegenerateId();      // Creates new ID and appends to sessionID
int x = CreateId(); //Returns a new SessionID

OTHER PROPERTIES

public static int SessionId { get; set; } //Holds the session ID
public static string SessionName { get; set; } //Holds the session name

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 1,046 3/29/2018

initial release